v2.0.0
Loading...
Searching...
No Matches
COMLIB::RawCommand Class Reference

Tokenised but unresolved command: a keyword plus a list of raw string arguments awaiting type binding. More...

#include <raw_command.h>

Signals

void executed (QList< QString > p_qListParameters)

Public Member Functions

 RawCommand (QObject *parent=0)
 RawCommand (const QString &p_sCommand, bool p_bIsJson=true, QObject *parent=0)
 RawCommand (const RawCommand &p_rawCommand)
QString command () const
quint32 count () const
virtual void execute ()
bool isJson () const
QList< QString > & pValues ()
RawCommandoperator= (const RawCommand &rhs)
Public Member Functions inherited from UTILSLIB::ICommand
virtual ~ICommand ()

Additional Inherited Members

Public Types inherited from UTILSLIB::ICommand
typedef QSharedPointer< ICommandSPtr
typedef QSharedPointer< const ICommandConstSPtr

Detailed Description

Tokenised but unresolved command: a keyword plus a list of raw string arguments awaiting type binding.

Emitted by CommandParser before any CommandManager has claimed the request. Observers turn the QList<QString> arguments into typed Command parameters once the matching schema is located. Retains the JSON-vs-CLI dialect flag so replies travel back in the same encoding the caller used.

Definition at line 70 of file raw_command.h.

Inheritance diagram for COMLIB::RawCommand:
Inheritance graph

Constructor & Destructor Documentation

◆ RawCommand() [1/3]

RawCommand::RawCommand ( QObject * parent = 0)
explicit

Default constructor.

Parameters
[in]parentParent QObject (optional).

Definition at line 36 of file raw_command.cpp.

◆ RawCommand() [2/3]

RawCommand::RawCommand ( const QString & p_sCommand,
bool p_bIsJson = true,
QObject * parent = 0 )
explicit

Constructor which parses a command stored in a json object

Parameters
[in]p_sCommandCommand.
[in]p_bIsJsonIf is received/should be send as JSON (optional, default true).
[in]parentParent QObject (optional).

Definition at line 44 of file raw_command.cpp.

◆ RawCommand() [3/3]

RawCommand::RawCommand ( const RawCommand & p_rawCommand)
explicit

Copy constructor.

Parameters
[in]p_rawCommandRawCommand which should be copied.

Definition at line 53 of file raw_command.cpp.

Member Function Documentation

◆ command()

QString COMLIB::RawCommand::command ( ) const
inline

Command name

Returns
short command representation.

Definition at line 164 of file raw_command.h.

◆ count()

quint32 COMLIB::RawCommand::count ( ) const
inline

Returns the number of parameters.

Returns
number of parameters.

Definition at line 171 of file raw_command.h.

◆ execute()

void RawCommand::execute ( )
virtual

Executes the ICommand.

Implements UTILSLIB::ICommand.

Definition at line 63 of file raw_command.cpp.

◆ executed

void COMLIB::RawCommand::executed ( QList< QString > p_qListParameters)
signal

Signal which is emitted when command patterns execute method is processed.

Parameters
[in]p_qListParametersParameter List.

◆ isJson()

bool COMLIB::RawCommand::isJson ( ) const
inline

Returns whether the received command was in Json format.

Returns
true if received command was in Json format, false otherwise.

Definition at line 178 of file raw_command.h.

◆ operator=()

RawCommand & RawCommand::operator= ( const RawCommand & rhs)

Assignment Operator

Parameters
[in]rhsRawCommand which should be assigned.

Definition at line 70 of file raw_command.cpp.

◆ pValues()

QList< QString > & COMLIB::RawCommand::pValues ( )
inline

Returns parameter values

Returns
parameter values.

Definition at line 185 of file raw_command.h.


The documentation for this class was generated from the following files: