comparison gui/src/OctaveLink.h @ 13506:c70511cf64ee

Reformatted to GNU Style.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Sun, 17 Jul 2011 22:59:28 +0200
parents 13e3d60aff2d
children e19c454ed485
comparison
equal deleted inserted replaced
13505:3a26a0ad2df9 13506:c70511cf64ee
77 #include <QString> 77 #include <QString>
78 #include <QVector> 78 #include <QVector>
79 #include <QSemaphore> 79 #include <QSemaphore>
80 #include <QObject> 80 #include <QObject>
81 81
82 typedef symbol_table::symbol_record SymbolRecord; 82 typedef
83 typedef octave_value OctaveValue; 83 symbol_table::symbol_record
84 SymbolRecord;
85 typedef octave_value
86 OctaveValue;
84 87
85 /** 88 /**
86 * \class OctaveLink 89 * \class OctaveLink
87 * Manages a link to an octave instance. 90 * Manages a link to an octave instance.
88 */ 91 */
89 class OctaveLink : QObject 92 class
93 OctaveLink:
94 QObject
90 { 95 {
91 Q_OBJECT 96 Q_OBJECT
92 public: 97 public:
93 static OctaveLink *instance() { return &m_singleton; } 98 static OctaveLink *
94 static int readlineEventHook(void); 99 instance ()
95 static QString octaveValueAsQString(OctaveValue octaveValue); 100 {
101 return &m_singleton;
102 }
103 static int
104 readlineEventHook (void);
105 static QString
106 octaveValueAsQString (OctaveValue octaveValue);
96 107
97 /** 108 /**
98 * Returns a copy of the current symbol table buffer. 109 * Returns a copy of the current symbol table buffer.
99 * \return Copy of the current symbol table buffer. 110 * \return Copy of the current symbol table buffer.
100 */ 111 */
101 QList<SymbolRecord> currentSymbolTable(); 112 QList < SymbolRecord > currentSymbolTable ();
102 113
103 /** 114 /**
104 * Returns a copy of the current history buffer. 115 * Returns a copy of the current history buffer.
105 * \return Copy of the current history buffer. 116 * \return Copy of the current history buffer.
106 */ 117 */
107 string_vector currentHistory(); 118 string_vector
119 currentHistory ();
108 120
109 void processOctaveServerData(); 121 void
122 processOctaveServerData ();
110 123
111 /** 124 /**
112 * Updates the current symbol table with new data 125 * Updates the current symbol table with new data
113 * from octave. 126 * from octave.
114 */ 127 */
115 void fetchSymbolTable(); 128 void
129 fetchSymbolTable ();
116 130
117 /** 131 /**
118 * Updates the current history buffer with new data 132 * Updates the current history buffer with new data
119 * from octave. 133 * from octave.
120 */ 134 */
121 void fetchHistory(); 135 void
136 fetchHistory ();
122 137
123 signals: 138 signals:
124 void symbolTableChanged(); 139 void
125 void historyChanged(); 140 symbolTableChanged ();
141 void
142 historyChanged ();
126 143
127 private: 144 private:
128 OctaveLink(); 145 OctaveLink ();
129 ~OctaveLink(); 146 ~OctaveLink ();
130 147
131 /** Variable related member variables. */ 148 /** Variable related member variables. */
132 QSemaphore *m_symbolTableSemaphore; 149 QSemaphore *
133 QList<SymbolRecord> m_symbolTableBuffer; 150 m_symbolTableSemaphore;
151 QList < SymbolRecord > m_symbolTableBuffer;
134 152
135 /** History related member variables. */ 153 /** History related member variables. */
136 QSemaphore *m_historySemaphore; 154 QSemaphore *
137 string_vector m_historyBuffer; 155 m_historySemaphore;
138 int m_previousHistoryLength; 156 string_vector
157 m_historyBuffer;
158 int
159 m_previousHistoryLength;
139 160
140 static OctaveLink m_singleton; 161 static OctaveLink
162 m_singleton;
141 }; 163 };
142 #endif // OCTAVELINK_H 164 #endif // OCTAVELINK_H
143