MNE-CPP  beta 1.0
Signals | Public Member Functions | List of all members
RTCOMMANDLIB::CommandParser Class Reference
Inheritance diagram for RTCOMMANDLIB::CommandParser:
Subject

Signals

void response (QString p_sResponse, Command p_command)
 

Public Member Functions

 CommandParser (QObject *parent=0)
 
bool exists (const QString &p_sCommand)
 
bool parse (const QString &p_sInput, QStringList &p_qListCommandsParsed)
 
RawCommandgetRawCommand ()
 
- Public Member Functions inherited from Subject
virtual ~Subject ()
 
void attach (IObserver *pObserver)
 
void detach (IObserver *pObserver)
 
void notify ()
 
t_Observersobservers ()
 
int observerNumDebug ()
 

Additional Inherited Members

- Public Types inherited from Subject
typedef QSharedPointer< SubjectSPtr
 
typedef QSharedPointer< const SubjectConstSPtr
 
typedef QSet< IObserver * > t_Observers
 
- Static Public Attributes inherited from Subject
static bool notifyEnabled = true
 
- Protected Member Functions inherited from Subject
 Subject ()
 

Detailed Description

Definition at line 70 of file commandparser.h.

Constructor & Destructor Documentation

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

Default constructor

Parameters
[in]parentParent QObject (optional)

Definition at line 68 of file commandparser.cpp.

Member Function Documentation

bool CommandParser::exists ( const QString &  p_sCommand)

Checks if a command exists

Parameters
[in]p_sCommandCommand to check.
Returns
true if command exists, false otherwise.

Definition at line 76 of file commandparser.cpp.

RawCommand & RTCOMMANDLIB::CommandParser::getRawCommand ( )
inline

Returns the stored RawCommand

Returns
the stored RawCommand

Definition at line 131 of file commandparser.h.

bool CommandParser::parse ( const QString &  p_sInput,
QStringList &  p_qListCommandsParsed 
)

Parses a CLI command or JSON command (list) and notifies all attached observers (command managers)

Parameters
[in]p_sInputInput to parse.
[out]p_qListCommandsParsedList of parsed commands.

Definition at line 91 of file commandparser.cpp.

void RTCOMMANDLIB::CommandParser::response ( QString  p_sResponse,
Command  p_command 
)
signal

Response channel which is used by attached observers (command managers) to send data back to subject

Parameters
[in]p_sResponseObserver response/data.
[in]p_commandCommand which send the response

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