MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
rawcommand.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef RAWCOMMAND_H
38#define RAWCOMMAND_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../communication_global.h"
45
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QObject>
53#include <QList>
54#include <QVariant>
55
56//=============================================================================================================
57// DEFINE NAMESPACE COMMUNICATIONLIB
58//=============================================================================================================
59
60namespace COMMUNICATIONLIB
61{
62
63//=============================================================================================================
70{
71Q_OBJECT
72
73public:
74
75 //=========================================================================================================
81 explicit RawCommand(QObject *parent = 0);
82
83 //=========================================================================================================
91 explicit RawCommand(const QString &p_sCommand, bool p_bIsJson = true, QObject *parent = 0);
92
93 //=========================================================================================================
99 explicit RawCommand(const RawCommand &p_rawCommand);
100
101 //=========================================================================================================
107 inline QString command() const;
108
109 //=========================================================================================================
115 inline quint32 count() const;
116
117 virtual void execute();
118
119 //=========================================================================================================
125 inline bool isJson() const;
126
127 //=========================================================================================================
133 inline QList<QString>& pValues();
134
135 //=========================================================================================================
141 RawCommand& operator= (const RawCommand &rhs);
142
143signals:
144 //=========================================================================================================
150 void executed(QList<QString> p_qListParameters);
151
152private:
153 QString m_sCommand;
154 bool m_bIsJson;
155
156 QList<QString> m_qListRawParameters;
157};
158
159//=============================================================================================================
160// DEFINE MEMBER METHODS
161//=============================================================================================================
162
163QString RawCommand::command() const
164{
165 return m_sCommand;
166}
167
168//=============================================================================================================
169
170quint32 RawCommand::count() const
171{
172 return m_qListRawParameters.size();
173}
174
175//=============================================================================================================
176
178{
179 return m_bIsJson;
180}
181
182//=============================================================================================================
183
184QList<QString>& RawCommand::pValues()
185{
186 return m_qListRawParameters;
187}
188} // NAMESPACE
189
190#endif // RAWCOMMAND_H
Contains declarations of the command design pattern: ICommand interface.
#define COMMUNICATIONSHARED_EXPORT
void executed(QList< QString > p_qListParameters)
QList< QString > & pValues()
Definition rawcommand.h:184
The ICommand interface provides the base class of every command of the command design pattern.