cisst-saw
|
#include <mtsCommandVoid.h>
Public Types | |
typedef mtsCommandBase | BaseType |
typedef mtsCommandVoid | ThisType |
Public Member Functions | |
mtsCommandVoid (void) | |
mtsCommandVoid (mtsCallableVoidBase *callable, const std::string &name) | |
virtual | ~mtsCommandVoid () |
virtual mtsExecutionResult | Execute (mtsBlockingType CMN_UNUSED(blocking)) |
virtual mtsExecutionResult | Execute (mtsBlockingType blocking, mtsCommandWriteBase *CMN_UNUSED(finishedEventHandler)) |
mtsCallableVoidBase * | GetCallable (void) const |
void | ToStream (std::ostream &outputStream) const |
size_t | NumberOfArguments (void) const |
bool | Returns (void) const |
![]() | |
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 | |
mtsCallableVoidBase * | Callable |
![]() | |
std::string | Name |
bool | EnableFlag |
A templated version of command object with zero arguments for execute. The template argument is the class type whose method is contained in the command object. This command is based on a void method, i.e. it requires the class and method name as well as an instantiation of the class to get and actual pointer on the method.
This type.
mtsCommandVoid::mtsCommandVoid | ( | void | ) |
The constructor. Does nothing.
mtsCommandVoid::mtsCommandVoid | ( | mtsCallableVoidBase * | callable, |
const std::string & | name | ||
) |
The constructor.
action | Pointer to the member function that is to be called by the invoker of the command |
classInstantiation | Pointer to the receiver of the command |
name | A string to identify the command. |
|
virtual |
The destructor. Does nothing
|
virtual |
The execute method. Calling the execute method from the invoker applies the operation on the receiver.
Reimplemented in mtsMulticastCommandVoid.
|
inlinevirtual |
Execute method that includes a pointer to a handler for the finished event. This is intended for derived classes (e.g., mtsCommandQueuedVoid).
mtsCallableVoidBase* mtsCommandVoid::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 |
Returns number of arguments (parameters) expected by Execute method. Must be overloaded in derived classes.
Implements mtsCommandBase.
|
virtual |
Implements mtsCommandBase.
|
virtual |
Implements mtsCommandBase.
Reimplemented in mtsMulticastCommandVoid.
|
protected |
The pointer to member function of the receiver class that is to be invoked for a particular instance of the command.