A user friendly method to a TaskContext. More...
#include <rtt/MethodC.hpp>
Public Member Functions | |
MethodC () | |
The default constructor. | |
MethodC (const MethodFactory *mr, const std::string &name) | |
The constructor. | |
MethodC (const MethodC &other) | |
A MethodC is copyable by value. | |
MethodC & | operator= (const MethodC &other) |
A MethodC is assignable. | |
MethodC & | arg (DataSourceBase::shared_ptr a) |
Add a datasource argument to the Method. | |
template<class ArgT > | |
MethodC & | argC (const ArgT a) |
Add a constant argument to the Method. | |
template<class ArgT > | |
MethodC & | arg (ArgT &a) |
Add an argument by reference to the Method. | |
MethodC & | ret (AttributeBase *r) |
Store the result of the method in a task's attribute. | |
MethodC & | ret (DataSourceBase::shared_ptr r) |
Store the result of the method in a DataSource. | |
template<class RetT > | |
MethodC & | ret (RetT &r) |
Store the result of the method in variable. | |
bool | execute () |
Execute the contained method. | |
void | reset () |
Reset the method. | |
bool | ready () const |
Returns true if this method is ready for execution. | |
DataSourceBase::shared_ptr | getDataSource () |
Get the contained data source. |
A user friendly method to a TaskContext.
Definition at line 52 of file MethodC.hpp.
RTT::MethodC::MethodC | ( | ) |
The default constructor.
Make a copy from another MethodC object in order to make it usable.
RTT::MethodC::MethodC | ( | const MethodFactory * | mr, | |
const std::string & | name | |||
) |
The constructor.
MethodC& RTT::MethodC::arg | ( | ArgT & | a | ) | [inline] |
Add an argument by reference to the Method.
a | A value of which the reference is used and re-read each time the method is executed. Thus if the contents of the source of a changes, execute() will use the new contents. |
Definition at line 111 of file MethodC.hpp.
MethodC& RTT::MethodC::arg | ( | DataSourceBase::shared_ptr | a | ) |
Add a datasource argument to the Method.
a | A DataSource which contents are consulted each time when execute() is called. |
MethodC& RTT::MethodC::argC | ( | const ArgT | a | ) | [inline] |
Add a constant argument to the Method.
a | A value of which a copy is made and this value is used each time in execute(). |
Definition at line 99 of file MethodC.hpp.
void RTT::MethodC::reset | ( | ) |
Reset the method.
Required before invoking execute() a second time.
MethodC& RTT::MethodC::ret | ( | RetT & | r | ) | [inline] |
Store the result of the method in variable.
r | A reference to the variable in which the result is stored. |
Definition at line 133 of file MethodC.hpp.
MethodC& RTT::MethodC::ret | ( | DataSourceBase::shared_ptr | r | ) |
Store the result of the method in a DataSource.
r | A data source in which the result is stored. |
MethodC& RTT::MethodC::ret | ( | AttributeBase * | r | ) |
Store the result of the method in a task's attribute.
r | A task attribute in which the result is stored. |