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

#include <mtsCommandRead.h>

Inheritance diagram for mtsCommandRead:
mtsCommandBase

Public Types

typedef mtsCommandBase BaseType
 
typedef mtsCommandRead ThisType
 
typedef mtsCallableReadBase CallableType
 

Public Member Functions

 mtsCommandRead (void)
 
 mtsCommandRead (const std::string &name)
 
 mtsCommandRead (mtsCallableReadBase *callable, const std::string &name, const mtsGenericObject *argumentPrototype)
 
 ~mtsCommandRead ()
 
virtual mtsExecutionResult Execute (mtsGenericObject &argument)
 
virtual mtsExecutionResult Execute (mtsGenericObject &argument, mtsCommandWriteBase *CMN_UNUSED(finishedEventHandler))
 
mtsCallableReadBaseGetCallable (void) const
 
virtual const mtsGenericObjectGetArgumentPrototype (void) const
 
virtual const mtsGenericObjectGetResultPrototype (void) const
 
size_t NumberOfArguments (void) const
 
bool Returns (void) const
 
void ToStream (std::ostream &outputStream) const
 
- Public Member Functions inherited from mtsCommandBase
 mtsCommandBase (void)
 
 mtsCommandBase (const std::string &name)
 
virtual ~mtsCommandBase ()
 
const std::string & GetName (void) const
 
virtual std::string ToString (void) const
 
void Enable (void)
 
void Disable (void)
 
bool IsEnabled (void) const
 
bool IsDisabled (void) const
 

Protected Attributes

mtsCallableReadBaseCallable
 
const mtsGenericObjectArgumentPrototype
 
- Protected Attributes inherited from mtsCommandBase
std::string Name
 
bool EnableFlag
 

Detailed Description

A templated version of command object with one argument for execute. The template argument is the interface type whose method is contained in the command object.

Member Typedef Documentation

Base type

Callable type

This type.

Constructor & Destructor Documentation

mtsCommandRead::mtsCommandRead ( void  )

The constructor. Does nothing

mtsCommandRead::mtsCommandRead ( const std::string &  name)
mtsCommandRead::mtsCommandRead ( mtsCallableReadBase callable,
const std::string &  name,
const mtsGenericObject argumentPrototype 
)

The constructor.

Parameters
actionPointer to the member function that is to be called by the invoker of the command
nameA string to identify the command
argumentPrototypeAn instance of the argument being used
mtsCommandRead::~mtsCommandRead ( )

The destructor. Does nothing

Member Function Documentation

virtual mtsExecutionResult mtsCommandRead::Execute ( mtsGenericObject argument)
virtual

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

Parameters
objThe data passed to the operation method
virtual mtsExecutionResult mtsCommandRead::Execute ( mtsGenericObject argument,
mtsCommandWriteBase CMN_UNUSEDfinishedEventHandler 
)
inlinevirtual

Execute method that includes a pointer to a handler for the finished event. This is intended for derived classes (e.g., mtsCommandQueuedRead).

virtual const mtsGenericObject* mtsCommandRead::GetArgumentPrototype ( void  ) const
virtual
mtsCallableReadBase* mtsCommandRead::GetCallable ( void  ) const

Get a direct pointer to the callable object. This method is used for queued commands. The caller should still use the Execute method which will queue the command. When the command is de-queued, one needs access to the callable object to call the final method or function.

virtual const mtsGenericObject* mtsCommandRead::GetResultPrototype ( void  ) const
virtual
size_t mtsCommandRead::NumberOfArguments ( void  ) const
virtual

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

Implements mtsCommandBase.

bool mtsCommandRead::Returns ( void  ) const
virtual

Implements mtsCommandBase.

void mtsCommandRead::ToStream ( std::ostream &  outputStream) const
virtual

Implements mtsCommandBase.

Member Data Documentation

const mtsGenericObject* mtsCommandRead::ArgumentPrototype
protected
mtsCallableReadBase* mtsCommandRead::Callable
protected

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