cisst-saw
Loading...
Searching...
No Matches
mtsCommandRead Class Reference

#include <mtsCommandRead.h>

Inheritance diagram for mtsCommandRead:
mtsCommandBase mtsCommandQueuedVoidReturnBase< mtsCommandRead >

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 ()
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

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

◆ BaseType

◆ CallableType

◆ ThisType

Constructor & Destructor Documentation

◆ mtsCommandRead() [1/3]

mtsCommandRead::mtsCommandRead ( void )

The constructor. Does nothing

◆ mtsCommandRead() [2/3]

mtsCommandRead::mtsCommandRead ( const std::string & name)

◆ mtsCommandRead() [3/3]

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::~mtsCommandRead ( )

The destructor. Does nothing

Member Function Documentation

◆ Execute() [1/2]

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

Reimplemented in mtsCommandQueuedVoidReturnBase< mtsCommandRead >.

◆ Execute() [2/2]

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).

◆ GetArgumentPrototype()

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

◆ GetCallable()

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.

◆ GetResultPrototype()

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

◆ NumberOfArguments()

size_t mtsCommandRead::NumberOfArguments ( void ) const
virtual

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

Implements mtsCommandBase.

◆ Returns()

bool mtsCommandRead::Returns ( void ) const
virtual

Implements mtsCommandBase.

◆ ToStream()

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

Implements mtsCommandBase.

Member Data Documentation

◆ ArgumentPrototype

const mtsGenericObject* mtsCommandRead::ArgumentPrototype
protected

◆ Callable

mtsCallableReadBase* mtsCommandRead::Callable
protected

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