cisst-saw
Loading...
Searching...
No Matches
mtsCommandWriteGeneric< _classType > Class Template Reference

#include <mtsCommandWrite.h>

Inheritance diagram for mtsCommandWriteGeneric< _classType >:
mtsCommandWriteBase mtsCommandBase

Public Types

typedef mtsCommandWriteBase BaseType
typedef _classType ClassType
typedef mtsCommandWriteGeneric< ClassTypeThisType
typedef void(_classType::*) ActionType(const mtsGenericObject &)
Public Types inherited from mtsCommandWriteBase
typedef mtsCommandBase BaseType

Public Member Functions

 mtsCommandWriteGeneric (ActionType action, ClassType *classInstantiation, const std::string &name, const mtsGenericObject *argumentPrototype)
virtual ~mtsCommandWriteGeneric ()
mtsExecutionResult Execute (const mtsGenericObject &argument, mtsBlockingType CMN_UNUSED(blocking))
mtsExecutionResult Execute (const mtsGenericObject &argument, mtsBlockingType blocking, mtsCommandWriteBase *CMN_UNUSED(finishedEventHandler))
void ToStream (std::ostream &outputStream) const
Public Member Functions inherited from mtsCommandWriteBase
 mtsCommandWriteBase (void)
 mtsCommandWriteBase (const std::string &name)
virtual ~mtsCommandWriteBase ()
virtual mtsExecutionResult Execute (const mtsGenericObject &argument, mtsBlockingType blocking)=0
size_t NumberOfArguments (void) const
bool Returns (void) const
virtual const mtsGenericObjectGetArgumentPrototype (void) const
const cmnClassServicesBaseGetArgumentClassServices (void) const
Public Member Functions inherited from mtsCommandBase
 mtsCommandBase (void)
 mtsCommandBase (const std::string &name)
virtual ~mtsCommandBase ()
virtual std::string ToString (void) const
void Enable (void)
void Disable (void)
bool IsEnabled (void) const
bool IsDisabled (void) const
const std::string & GetName (void) const

Protected Attributes

ActionType Action
ClassTypeClassInstantiation
Protected Attributes inherited from mtsCommandWriteBase
const mtsGenericObjectArgumentPrototype
Protected Attributes inherited from mtsCommandBase
std::string Name
bool EnableFlag

Additional Inherited Members

Protected Member Functions inherited from mtsCommandWriteBase
virtual void SetArgumentPrototype (const mtsGenericObject *argumentPrototype)

Member Typedef Documentation

◆ ActionType

template<class _classType>
typedef void(_classType::*) mtsCommandWriteGeneric< _classType >::ActionType(const mtsGenericObject &)

Typedef for pointer to member function of the specific interface class.

◆ BaseType

template<class _classType>
typedef mtsCommandWriteBase mtsCommandWriteGeneric< _classType >::BaseType

◆ ClassType

template<class _classType>
typedef _classType mtsCommandWriteGeneric< _classType >::ClassType

Typedef for the specific interface.

◆ ThisType

template<class _classType>
typedef mtsCommandWriteGeneric<ClassType> mtsCommandWriteGeneric< _classType >::ThisType

This type.

Constructor & Destructor Documentation

◆ mtsCommandWriteGeneric()

template<class _classType>
mtsCommandWriteGeneric< _classType >::mtsCommandWriteGeneric ( ActionType action,
ClassType * classInstantiation,
const std::string & name,
const mtsGenericObject * argumentPrototype )
inline

The constructor.

Parameters
actionPointer to the member function that is to be called by the invoker of the command
classInstantiationPointer to the receiver of the command
nameA string to identify the command.

◆ ~mtsCommandWriteGeneric()

template<class _classType>
virtual mtsCommandWriteGeneric< _classType >::~mtsCommandWriteGeneric ( )
inlinevirtual

The destructor. Does nothing

Member Function Documentation

◆ Execute() [1/2]

template<class _classType>
mtsExecutionResult mtsCommandWriteGeneric< _classType >::Execute ( const mtsGenericObject & argument,
mtsBlockingType blocking,
mtsCommandWriteBase * CMN_UNUSEDfinishedEventHandler )
inlinevirtual

The execute method. Method may be implemented by derived classes to run the actual operation on the receiver

Parameters
argumentThe data passed to the operation method
blockingIndicates whether caller wishes to block until command finishes
finishedEventHandlerCommand object to invoke when blocking command is finished
Returns
the execution result (mtsExecutionResult)

Implements mtsCommandWriteBase.

◆ Execute() [2/2]

template<class _classType>
mtsExecutionResult mtsCommandWriteGeneric< _classType >::Execute ( const mtsGenericObject & argument,
mtsBlockingType CMN_UNUSEDblocking )
inline

The execute method. Calling the execute method from the invoker applies the operation on the receiver.

Parameters
objThe data passed to the operation method

◆ ToStream()

template<class _classType>
void mtsCommandWriteGeneric< _classType >::ToStream ( std::ostream & outputStream) const
inlinevirtual

Implements mtsCommandBase.

Member Data Documentation

◆ Action

template<class _classType>
ActionType mtsCommandWriteGeneric< _classType >::Action
protected

The pointer to member function of the receiver class that is to be invoked for a particular instance of the command

◆ ClassInstantiation

template<class _classType>
ClassType* mtsCommandWriteGeneric< _classType >::ClassInstantiation
protected

Stores the receiver object of the command


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