cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
mtsCommandBase Class Referenceabstract

#include <mtsCommandBase.h>

Inheritance diagram for mtsCommandBase:
mtsCommandQualifiedRead mtsCommandRead mtsCommandVoid mtsCommandVoidReturn mtsCommandWriteBase mtsCommandWriteReturn mtsCommandQueuedVoid mtsMulticastCommandVoid mtsCommandFilteredWrite mtsCommandQueuedWriteBase mtsCommandWrite< _classType, _argumentType > mtsCommandWriteGeneric< _classType > mtsMulticastCommandWriteBase mtsCommandQueuedWrite< _argumentType > mtsCommandQueuedWriteGeneric mtsMulticastCommandWrite< _argumentType > mtsMulticastCommandWriteGeneric mtsCommandFilteredQueuedWrite

Public Member Functions

 mtsCommandBase (void)
 
 mtsCommandBase (const std::string &name)
 
virtual ~mtsCommandBase ()
 
virtual size_t NumberOfArguments (void) const =0
 
virtual bool Returns (void) const =0
 
const std::string & GetName (void) const
 
virtual std::string ToString (void) const
 
virtual void ToStream (std::ostream &outputStream) const =0
 
void Enable (void)
 
void Disable (void)
 
bool IsEnabled (void) const
 
bool IsDisabled (void) const
 

Protected Attributes

std::string Name
 
bool EnableFlag
 

Constructor & Destructor Documentation

mtsCommandBase::mtsCommandBase ( void  )
inline

The constructor. Does nothing

mtsCommandBase::mtsCommandBase ( const std::string &  name)
inline

Constructor with command name.

virtual mtsCommandBase::~mtsCommandBase ( )
inlinevirtual

The destructor. Does nothing

Member Function Documentation

void mtsCommandBase::Disable ( void  )
inline
void mtsCommandBase::Enable ( void  )
inline

Set and access the "enable" flag. This flag is used to determine if the command actually uses the provided method or function when it is executed.

const std::string& mtsCommandBase::GetName ( void  ) const
inline

Get the command name. This method doesn't allow to change the command name.

bool mtsCommandBase::IsDisabled ( void  ) const
inline
bool mtsCommandBase::IsEnabled ( void  ) const
inline
virtual size_t mtsCommandBase::NumberOfArguments ( void  ) const
pure virtual

Returns number of arguments (parameters) expected by Execute method. Must be overloaded in derived classes.

Implemented in mtsCommandQualifiedRead, mtsCommandWriteReturn, mtsCommandRead, mtsCommandVoidReturn, mtsCommandVoid, and mtsCommandWriteBase.

virtual bool mtsCommandBase::Returns ( void  ) const
pure virtual
virtual void mtsCommandBase::ToStream ( std::ostream &  outputStream) const
pure virtual
virtual std::string mtsCommandBase::ToString ( void  ) const
inlinevirtual

For debugging. Generate a human readable output for the command object

Member Data Documentation

bool mtsCommandBase::EnableFlag
protected

Flag used to determine is the command actually executes the provided method or function. This "gated" command can be useful to turn on/off and event callback or to prevent calling a method owned by an object being deleted.

std::string mtsCommandBase::Name
protected

Name used for the command. The name is provided to the constructor and can be accessed using the method GetName().


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