#include <rtt/Method.hpp>
Usage:
Method<double(int, double)> mymeth("name", &Class::foo, &c); double result = mymeth( 3, 1.9);
Definition at line 71 of file Method.hpp.
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 | ( | ) | [inline] |
Create an empty Method object.
Use assignment to initialise it.
Definition at line 91 of file Method.hpp.
| Method | ( | std::string | name | ) | [inline] |
Create an empty Method object.
Use assignment to initialise it.
Definition at line 100 of file Method.hpp.
| Method | ( | boost::shared_ptr< ActionInterface > | implementation | ) | [inline] |
Initialise a nameless Method object from an implementation.
| implementation | The implementation which is acquired by the Method object. If it has the wrong type, it is freed. |
Definition at line 136 of file Method.hpp.
References RTT::Error.
| 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. |
Definition at line 173 of file Method.hpp.
| 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. |
Definition at line 185 of file Method.hpp.
Method objects may be assigned.
| m | the original |
Definition at line 121 of file Method.hpp.
References Method::operator=().
Referenced by Method::operator=().
| Method& operator= | ( | ActionInterface * | implementation | ) | [inline] |
Method objects may be assigned to an implementation.
| implementation | the implementation, if it is not suitable, it is freed. |
Definition at line 153 of file Method.hpp.
References RTT::Error, and Method::operator=().
| bool ready | ( | ) | const [inline] |
Check if this Method is ready for execution.
Definition at line 202 of file Method.hpp.
References Method::ready().
Referenced by Method::ready().
1.5.3