57#include <QSharedPointer>
69static QVariant defaultVariant;
82 typedef QSharedPointer<Command>
SPtr;
92 explicit Command(
bool p_bIsJson =
true, QObject *parent = 0);
103 explicit Command(
const QString &p_sCommand,
const QJsonObject &p_qCommandContent,
bool p_bIsJson =
true, QObject *parent = 0);
114 explicit Command(
const QString &p_sCommand,
const QString &p_sDescription,
bool p_bIsJson =
true, QObject *parent = 0);
127 explicit Command(
const QString &p_sCommand,
const QString &p_sDescription,
128 const QStringList &p_qListParamNames,
const QList<QVariant> &p_qListParamValues,
bool p_bIsJson =
true, QObject *parent = 0);
140 explicit Command(
const QString &p_sCommand,
const QString &p_sDescription,
141 const QStringList &p_qListParamNames,
const QList<QVariant> &p_qListParamValues,
const QStringList &p_vecParameterDescriptions,
bool p_bIsJson =
true, QObject *parent = 0);
163 inline QString
command()
const;
171 inline quint32
count()
const;
211 inline QList<QString>
pNames()
const;
219 inline QList<QVariant>&
pValues();
227 void reply(
const QString &p_sReply);
275 QVariant& operator[] (
const QString &key);
285 QVariant& operator[] (qint32 idx);
295 const QVariant operator[] (
const QString &key)
const;
Contains declarations of the command design pattern: ICommand interface.
realtime library export/import macros.
#define COMMUNICATIONSHARED_EXPORT
Real-time client/server communication (commands, raw data streaming).
QStringList toStringList() const
QString description() const
QStringList m_qListParamDescriptions
QJsonObject toJsonObject() const
QSharedPointer< Command > SPtr
QSharedPointer< const Command > ConstSPtr
void reply(const QString &p_sReply)
QList< QVariant > & pValues()
QList< QString > pNames() const
Command(bool p_bIsJson=true, QObject *parent=0)
QStringList m_qListParamNames
void executed(Command p_command)
QList< QString > pDescriptions() const
QString toStringReadySend() const
QList< QVariant > m_qListParamValues
The ICommand interface provides the base class of every command of the command design pattern.