#include <Operation.hpp>
Public Member Functions | |
Operation< Signature > & | arg (const std::string &name, const std::string &description) |
Operation< Signature > & | arg (const std::string &name, const std::string &description) |
template<class Function , class Object > | |
Operation & | calls (Function func, Object o, ExecutionThread et=ClientThread) |
Operation & | calls (boost::function< Signature > func, ExecutionThread et=ClientThread) |
template<class Function , class Object > | |
Operation & | calls (Function func, Object o, ExecutionThread et=ClientThread) |
Operation & | calls (boost::function< Signature > func, ExecutionThread et=ClientThread) |
Operation< Signature > & | doc (const std::string &description) |
Operation< Signature > & | doc (const std::string &description) |
virtual const base::DisposableInterface::shared_ptr | getImplementation () const |
virtual base::DisposableInterface::shared_ptr | getImplementation () |
virtual const base::DisposableInterface::shared_ptr | getImplementation () const |
virtual base::DisposableInterface::shared_ptr | getImplementation () |
virtual const base::OperationCallerBase < Signature >::shared_ptr | getOperationCaller () const |
virtual base::OperationCallerBase < Signature >::shared_ptr | getOperationCaller () |
virtual const base::OperationCallerBase < Signature >::shared_ptr | getOperationCaller () const |
virtual base::OperationCallerBase < Signature >::shared_ptr | getOperationCaller () |
template<class Function , class Object > | |
Operation (const std::string &name, Function func, Object o, ExecutionThread et=ClientThread) | |
Operation (const std::string &name, boost::function< Signature > func, ExecutionThread et=ClientThread) | |
Operation (const std::string &name) | |
template<class Function , class Object > | |
Operation (const std::string &name, Function func, Object o, ExecutionThread et=ClientThread) | |
Operation (const std::string &name, boost::function< Signature > func, ExecutionThread et=ClientThread) | |
Operation (const std::string &name) | |
template<class Function , class Object > | |
Handle | signals (Function func, Object o) |
Handle | signals (boost::function< Signature > func) |
template<class Function , class Object > | |
Handle | signals (Function func, Object o) |
Handle | signals (boost::function< Signature > func) |
~Operation () | |
~Operation () | |
Public Attributes | |
internal::Signal< Signature > ::shared_ptr | signal |
Private Member Functions | |
virtual void | ownerUpdated () |
virtual void | ownerUpdated () |
Private Attributes | |
internal::LocalOperationCaller < Signature >::shared_ptr | impl |
The operation ties a C or C++ function into a component interface. An operation consists of a name and a Signature.
For example, if you want his operation to call a function: bool foo(int a, double b) { return a < b; } Then the function Signature looks like: 'bool(int,double)' which is the signature type of 'bool foo(int a, double b)'. So a function signature is written as the function declaration, but without the function and argument names.
Signature | A template parameter that contains the function signature type of the function this operation object will call. |
Definition at line 69 of file install/include/rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name | ) | [inline] |
Create an operation object with a name. The resulting object will not call any function but can be used to attach Signal handlers to (using signals() ) or set the function to call later on with calls().
name | The name of this instance. |
Definition at line 80 of file install/include/rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name, | |
boost::function< Signature > | func, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Create an operation object with a name and function to execute.
name | The name of this instance. | |
func | The function to execute, for example &foo. | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 94 of file install/include/rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name, | |
Function | func, | |||
Object | o, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Create an operation object with a name and class member function to execute.
name | The name of this instance. | |
func | The function to execute, for example &Bar::foo | |
o | The object that has this function, for example &bar | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 108 of file install/include/rtt/Operation.hpp.
RTT::Operation< Signature >::~Operation | ( | ) | [inline] |
Definition at line 114 of file install/include/rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name | ) | [inline] |
Create an operation object with a name. The resulting object will not call any function but can be used to attach Signal handlers to (using signals() ) or set the function to call later on with calls().
name | The name of this instance. |
Definition at line 56 of file rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name, | |
boost::function< Signature > | func, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Create an operation object with a name and function to execute.
name | The name of this instance. | |
func | The function to execute, for example &foo. | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 70 of file rtt/Operation.hpp.
RTT::Operation< Signature >::Operation | ( | const std::string & | name, | |
Function | func, | |||
Object | o, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Create an operation object with a name and class member function to execute.
name | The name of this instance. | |
func | The function to execute, for example &Bar::foo | |
o | The object that has this function, for example &bar | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 84 of file rtt/Operation.hpp.
RTT::Operation< Signature >::~Operation | ( | ) | [inline] |
Definition at line 90 of file rtt/Operation.hpp.
Operation<Signature>& RTT::Operation< Signature >::arg | ( | const std::string & | name, | |
const std::string & | description | |||
) | [inline] |
Document an argument of this operation. Each time arg() is called, it documents the next argument.
name | A single word (identifier) denoting the name of this argument | |
description | A descriptive line of text for this argument |
Definition at line 108 of file rtt/Operation.hpp.
Operation<Signature>& RTT::Operation< Signature >::arg | ( | const std::string & | name, | |
const std::string & | description | |||
) | [inline] |
Document an argument of this operation. Each time arg() is called, it documents the next argument.
name | A single word (identifier) denoting the name of this argument | |
description | A descriptive line of text for this argument |
Definition at line 132 of file install/include/rtt/Operation.hpp.
Operation& RTT::Operation< Signature >::calls | ( | Function | func, | |
Object | o, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Indicate that this operation calls a given class member function. This will replace any previously registered function present in this operation.
func | The function to call when the operation is invoked, for example &Bar::foo | |
o | The object that has this function, for example &bar | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 135 of file rtt/Operation.hpp.
Operation& RTT::Operation< Signature >::calls | ( | boost::function< Signature > | func, | |
ExecutionThread | et = ClientThread | |||
) | [inline] |
Indicate that this operation calls a given function. This will replace any previously registered function present in this operation.
func | The function to call when the operation is invoked | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 117 of file rtt/Operation.hpp.
Operation& RTT::Operation< Signature >::calls | ( | Function | func, | |
Object | o, | |||
ExecutionThread | et = ClientThread | |||
) | [inline] |
Indicate that this operation calls a given class member function. This will replace any previously registered function present in this operation.
func | The function to call when the operation is invoked, for example &Bar::foo | |
o | The object that has this function, for example &bar | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 159 of file install/include/rtt/Operation.hpp.
Operation& RTT::Operation< Signature >::calls | ( | boost::function< Signature > | func, | |
ExecutionThread | et = ClientThread | |||
) | [inline] |
Indicate that this operation calls a given function. This will replace any previously registered function present in this operation.
func | The function to call when the operation is invoked | |
et | The thread that should execute the function when the operation is invoked. |
Definition at line 141 of file install/include/rtt/Operation.hpp.
Operation<Signature>& RTT::Operation< Signature >::doc | ( | const std::string & | description | ) | [inline] |
Document this operation.
description | A descriptive line of text. |
Definition at line 99 of file rtt/Operation.hpp.
Operation<Signature>& RTT::Operation< Signature >::doc | ( | const std::string & | description | ) | [inline] |
Document this operation.
description | A descriptive line of text. |
Definition at line 123 of file install/include/rtt/Operation.hpp.
virtual const base::DisposableInterface::shared_ptr RTT::Operation< Signature >::getImplementation | ( | ) | const [inline, virtual] |
Implements RTT::base::OperationBase.
Definition at line 173 of file rtt/Operation.hpp.
virtual base::DisposableInterface::shared_ptr RTT::Operation< Signature >::getImplementation | ( | ) | [inline, virtual] |
Returns the implementation object of this operation.
Implements RTT::base::OperationBase.
Definition at line 172 of file rtt/Operation.hpp.
virtual const base::DisposableInterface::shared_ptr RTT::Operation< Signature >::getImplementation | ( | ) | const [inline, virtual] |
Implements RTT::base::OperationBase.
Definition at line 197 of file install/include/rtt/Operation.hpp.
virtual base::DisposableInterface::shared_ptr RTT::Operation< Signature >::getImplementation | ( | ) | [inline, virtual] |
Returns the implementation object of this operation.
Implements RTT::base::OperationBase.
Definition at line 196 of file install/include/rtt/Operation.hpp.
virtual const base::OperationCallerBase<Signature>::shared_ptr RTT::Operation< Signature >::getOperationCaller | ( | ) | const [inline, virtual] |
Definition at line 176 of file rtt/Operation.hpp.
virtual base::OperationCallerBase<Signature>::shared_ptr RTT::Operation< Signature >::getOperationCaller | ( | ) | [inline, virtual] |
Definition at line 175 of file rtt/Operation.hpp.
virtual const base::OperationCallerBase<Signature>::shared_ptr RTT::Operation< Signature >::getOperationCaller | ( | ) | const [inline, virtual] |
Definition at line 200 of file install/include/rtt/Operation.hpp.
virtual base::OperationCallerBase<Signature>::shared_ptr RTT::Operation< Signature >::getOperationCaller | ( | ) | [inline, virtual] |
Definition at line 199 of file install/include/rtt/Operation.hpp.
virtual void RTT::Operation< Signature >::ownerUpdated | ( | ) | [inline, private, virtual] |
Implements RTT::base::OperationBase.
Definition at line 187 of file rtt/Operation.hpp.
virtual void RTT::Operation< Signature >::ownerUpdated | ( | ) | [inline, private, virtual] |
Implements RTT::base::OperationBase.
Definition at line 211 of file install/include/rtt/Operation.hpp.
Handle RTT::Operation< Signature >::signals | ( | Function | func, | |
Object | o | |||
) | [inline] |
Indicate that this operation signals a given function.
func | The function to call when the operation is invoked, for example &Bar::foo | |
o | The object that has this function, for example &bar |
Definition at line 168 of file rtt/Operation.hpp.
Handle RTT::Operation< Signature >::signals | ( | boost::function< Signature > | func | ) | [inline] |
Indicate that this operation signals a given function.
func | The function to call after the operation is executed |
Definition at line 149 of file rtt/Operation.hpp.
Handle RTT::Operation< Signature >::signals | ( | Function | func, | |
Object | o | |||
) | [inline] |
Indicate that this operation signals a given function.
func | The function to call when the operation is invoked, for example &Bar::foo | |
o | The object that has this function, for example &bar |
Definition at line 192 of file install/include/rtt/Operation.hpp.
Handle RTT::Operation< Signature >::signals | ( | boost::function< Signature > | func | ) | [inline] |
Indicate that this operation signals a given function.
func | The function to call after the operation is executed |
Definition at line 173 of file install/include/rtt/Operation.hpp.
internal::LocalOperationCaller< Signature >::shared_ptr RTT::Operation< Signature >::impl [private] |
Definition at line 210 of file install/include/rtt/Operation.hpp.
internal::Signal< Signature >::shared_ptr RTT::Operation< Signature >::signal |
You can signal this operation instead of calling it. This triggers all attached signal handlers added with signals().
Definition at line 208 of file install/include/rtt/Operation.hpp.