RTT::MethodC Class Reference

A user friendly method to a TaskContext. More...

#include <rtt/MethodC.hpp>

List of all members.

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.
MethodCoperator= (const MethodC &other)
 A MethodC is assignable.
MethodCarg (DataSourceBase::shared_ptr a)
 Add a datasource argument to the Method.
template<class ArgT >
MethodCargC (const ArgT a)
 Add a constant argument to the Method.
template<class ArgT >
MethodCarg (ArgT &a)
 Add an argument by reference to the Method.
MethodCret (AttributeBase *r)
 Store the result of the method in a task's attribute.
MethodCret (DataSourceBase::shared_ptr r)
 Store the result of the method in a DataSource.
template<class RetT >
MethodCret (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.

Detailed Description

A user friendly method to a TaskContext.

Definition at line 52 of file MethodC.hpp.


Constructor & Destructor Documentation

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.

See also:
MethodRepository

Member Function Documentation

template<class ArgT >
MethodC& RTT::MethodC::arg ( ArgT &  a  )  [inline]

Add an argument by reference to the Method.

Parameters:
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.

Parameters:
a A DataSource which contents are consulted each time when execute() is called.
template<class ArgT >
MethodC& RTT::MethodC::argC ( const ArgT  a  )  [inline]

Add a constant argument to the Method.

Parameters:
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.

template<class RetT >
MethodC& RTT::MethodC::ret ( RetT &  r  )  [inline]

Store the result of the method in variable.

Parameters:
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.

Parameters:
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.

Parameters:
r A task attribute in which the result is stored.

The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:43 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3