The base class for command interface which allows an interface to send and receive commands. More...
Inheritance diagram for MAKLogger::DtCommandInterface:
Collaboration diagram for MAKLogger::DtCommandInterface:Public Member Functions | |
| virtual | ~DtCommandInterface () |
| Virtual Constructor. | |
| virtual bool | update () |
| Remove all all commands from response queue Update is responsible for updating all responses and synchronizing state. | |
| void | disconnectFromDispatcher () |
| Disconnects the interface from its dispatcher, this is for temporarily removing itself from the message queue. | |
| void | reconnectToDispatcher () |
| Reconnect the interface to its dispatcher. | |
| void | addResponseHandler (const DtCommand &command, DtResponseFunctorSP) |
| virtual void | sendCommand (const DtCommand &) const |
| Send a command to the interface's dispatcher. | |
| bool | executeResponse (DtResponse command) |
| Execute a response. | |
Protected Types | |
|
typedef std::map< DtCommand, DtResponseFunctorSP, std::less < DtCommand > > | DtResponseMap |
| Callback types. | |
Protected Attributes | |
| DtResponseMap | myResponseMap |
| DtResponseQueueSP | myResponseQueue |
| The queue which stores commands sent to the interface from the dispatcher. | |
| DtCommandDispatcherSP | myDispatcher |
| A shared pointer to the interface's dispatcher. | |
Private Member Functions | |
| DtCommandInterface (const DtCommandInterface &src) | |
| Makes non-copyable. | |
| DtCommandInterface & | operator= (const DtCommandInterface &src) |
The base class for command interface which allows an interface to send and receive commands.
| virtual MAKLogger::DtCommandInterface::~DtCommandInterface | ( | ) | [virtual] |
Virtual Constructor.
Destructor
| void MAKLogger::DtCommandInterface::disconnectFromDispatcher | ( | ) |
Disconnects the interface from its dispatcher, this is for temporarily removing itself from the message queue.
| bool MAKLogger::DtCommandInterface::executeResponse | ( | DtResponse | command | ) |
Execute a response.
This function is not virtual since it should not be extended and for performance reasons.
| virtual bool MAKLogger::DtCommandInterface::update | ( | ) | [virtual] |
Remove all all commands from response queue Update is responsible for updating all responses and synchronizing state.
Thus it will be called before all state queries (but need not be called for each individual call), since each state call will call update behind the scenes.
Reimplemented in MAKLogger::DtLgrFullInterface.