Public Member Functions | Protected Types | Protected Attributes | Private Member Functions
MAKLogger::DtCommandInterface Class Reference

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:

List of all members.

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.
DtCommandInterfaceoperator= (const DtCommandInterface &src)

Detailed Description

The base class for command interface which allows an interface to send and receive commands.


Constructor & Destructor Documentation

virtual MAKLogger::DtCommandInterface::~DtCommandInterface ( ) [virtual]

Virtual Constructor.

Destructor


Member Function Documentation

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.


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)