v2.0.0
Loading...
Searching...
No Matches
commandparser.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef COMMANDPARSER_H
38#define COMMANDPARSER_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
45#include "rawcommand.h"
46#include "command.h"
47
49
50//=============================================================================================================
51// QT INCLUDES
52//=============================================================================================================
53
54#include <QObject>
55#include <QVector>
56#include <QMultiMap>
57
58//=============================================================================================================
59// DEFINE NAMESPACE COMMUNICATIONLIB
60//=============================================================================================================
61
62namespace COMMUNICATIONLIB
63{
64
69{
70 Q_OBJECT
71
72public:
73
74 //=========================================================================================================
80 explicit CommandParser(QObject *parent = 0);
81
82 //=========================================================================================================
90 bool exists(const QString& p_sCommand);
91
92 //=========================================================================================================
99 bool parse(const QString &p_sInput, QStringList &p_qListCommandsParsed);
100
101 //=========================================================================================================
107 inline RawCommand& getRawCommand();
108
109signals:
110 //=========================================================================================================
117 void response(QString p_sResponse, Command p_command);
118
119private:
120 RawCommand m_rawCommand;
121};
122
123//=============================================================================================================
124// INLINE DEFINITIONS
125//=============================================================================================================
126
128{
129 return m_rawCommand;
130}
131} // NAMESPACE
132
133#endif // COMMANDPARSER_H
Contains declarations of the observer design pattern: Subject class and IObserver interface.
realtime library export/import macros.
#define COMMUNICATIONSHARED_EXPORT
Declaration of the Command Class.
Declaration of the RawCommand Class.
Real-time client/server communication (commands, raw data streaming).
Named command with typed parameters for real-time server control.
Definition command.h:78
bool exists(const QString &p_sCommand)
bool parse(const QString &p_sInput, QStringList &p_qListCommandsParsed)
void response(QString p_sResponse, Command p_command)
Parsed but untyped command holding raw string parameters before type resolution.
Definition rawcommand.h:70
The Subject class provides the base class of every subject of the observer design pattern.