RawCommand
Namespace: COMLIB · Library: Communication Library
#include <com/raw_command.h>
class COMLIB::RawCommand
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.
Inheritance
Public Methods
RawCommand(parent)
Default constructor.
Parameters:
- parent : *QObject ** Parent QObject (optional).
RawCommand(p_sCommand, p_bIsJson, parent)
Constructor which parses a command stored in a json object.
Parameters:
-
p_sCommand : const QString &
Command. -
p_bIsJson : bool If is received/should be send as JSON (optional, default true).
-
parent : *QObject ** Parent QObject (optional).
RawCommand(p_rawCommand)
Copy constructor.
Parameters:
- p_rawCommand : const RawCommand &
RawCommandwhich should be copied.
command()
Command name.
Returns:
- QString — short command representation.
count()
Returns the number of parameters.
Returns:
- quint32 — number of parameters.
execute()
Executes the ICommand.
isJson()
Returns whether the received command was in Json format.
Returns:
- bool — true if received command was in Json format, false otherwise.
pValues()
Returns parameter values.
Returns:
- QList< QString > & — parameter values.
operator=(rhs)
Assignment Operator.
Parameters:
- rhs : const RawCommand &
RawCommandwhich should be assigned.
Returns:
- RawCommand & — Reference to this object.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>