MNE-CPP  beta 1.0
commandparser.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef COMMANDPARSER_H
37 #define COMMANDPARSER_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "rtcommand_global.h"
46 #include "rawcommand.h"
47 #include "command.h"
48 
50 
51 
52 //*************************************************************************************************************
53 //=============================================================================================================
54 // QT INCLUDES
55 //=============================================================================================================
56 
57 #include <QObject>
58 #include <QVector>
59 #include <QMultiMap>
60 
61 
62 //*************************************************************************************************************
63 //=============================================================================================================
64 // DEFINE NAMESPACE RTCOMMANDLIB
65 //=============================================================================================================
66 
67 namespace RTCOMMANDLIB
68 {
69 
70 class RTCOMMANDSHARED_EXPORT CommandParser : public QObject, public Subject
71 {
72  Q_OBJECT
73 public:
74 
75 
76  //=========================================================================================================
82  explicit CommandParser(QObject *parent = 0);
83 
84  //=========================================================================================================
92  bool exists(const QString& p_sCommand);
93 
94  //=========================================================================================================
101  bool parse(const QString &p_sInput, QStringList &p_qListCommandsParsed);
102 
103  //=========================================================================================================
109  inline RawCommand& getRawCommand();
110 
111 
112 signals:
113  //=========================================================================================================
120  void response(QString p_sResponse, Command p_command);
121 
122 private:
123  RawCommand m_rawCommand;
124 };
125 
126 //*************************************************************************************************************
127 //=============================================================================================================
128 // INLINE DEFINITIONS
129 //=============================================================================================================
130 
132 {
133  return m_rawCommand;
134 }
135 
136 } // NAMESPACE
137 
138 #endif // COMMANDPARSER_H
Declaration of the Command Class.
Declaration of the RawCommand Class.
#define RTCOMMANDSHARED_EXPORT
Contains declarations of the observer design pattern: Subject class and IObserver interface...
The Subject class provides the base class of every subject of the observer design pattern...
RtCommand library export/import macros.