#include <rtt/Method.hpp>
Usage:
Method<double(int, double)> mymeth("name", &Class::foo, &c); double result = mymeth( 3, 1.9);
Public Types | |
| typedef FunctionT | Signature |
|
typedef boost::function_traits< Signature >::result_type | result_type |
|
typedef boost::function_traits< Signature > | traits |
|
typedef boost::shared_ptr< detail::MethodBase< FunctionT > > | MethodBasePtr |
Public Member Functions | |
| Method () | |
| Create an empty Method object. | |
| Method (std::string name) | |
| Create an empty Method object. | |
| Method (const Method &m) | |
| Method objects may be copied. | |
| Method & | operator= (const Method &m) |
| Method objects may be assigned. | |
| Method (boost::shared_ptr< ActionInterface > implementation) | |
| Initialise a nameless Method object from an implementation. | |
| Method & | operator= (ActionInterface *implementation) |
| Method objects may be assigned to an implementation. | |
| template<class M, class ObjectType> | |
| Method (std::string name, M meth, ObjectType object) | |
| Construct a Method from a class member pointer and an object of that class. | |
| template<class M> | |
| Method (std::string name, M meth) | |
| Construct a Method from a function pointer or function object. | |
| ~Method () | |
| Clean up the Method object. | |
| bool | ready () const |
| Check if this Method is ready for execution. | |
| const std::string & | getName () const |
| Get the name of this method. | |
| const MethodBasePtr | getMethodImpl () const |
| Returns the internal implementation of the Method object. | |
| void | setMethodImpl (MethodBasePtr new_impl) const |
| Sets the internal implementation of the Method object. | |
| Method | ( | void | ) | [inline] |
| Method | ( | std::string | name | ) | [inline] |
| Method | ( | boost::shared_ptr< ActionInterface > | implementation | ) | [inline] |
| Method | ( | std::string | name, | |
| M | meth, | |||
| ObjectType | object | |||
| ) | [inline] |
Construct a Method from a class member pointer and an object of that class.
| name | The name of this method | |
| meth | A pointer to a class member function | |
| object | An object of the class which has meth as member function. |
| Method | ( | std::string | name, | |
| M | meth | |||
| ) | [inline] |
Construct a Method from a function pointer or function object.
| name | the name of this method | |
| meth | an pointer to a function or function object. |
| Method& operator= | ( | ActionInterface * | implementation | ) | [inline] |
Method objects may be assigned to an implementation.
| implementation | the implementation, if it is not suitable, it is freed. |
| bool ready | ( | ) | const [inline] |
1.5.1