39 #ifndef ORO_RTT_OPERATION_HPP_ 40 #define ORO_RTT_OPERATION_HPP_ 44 #include <boost/fusion/include/vector.hpp> 47 #ifdef ORO_SIGNALLING_OPERATIONS 70 template<
class Signature>
72 :
public base::OperationBase
88 impl = boost::make_shared<internal::LocalOperationCaller<Signature> >( boost::function<Signature>(), null_e, null_e,
ClientThread);
101 this->
calls(func, et, ownerEngine);
112 template<
class Function,
class Object>
116 this->
calls(func, o, et, ownerEngine);
150 impl = boost::make_shared<internal::LocalOperationCaller<Signature> >(func, ownerEngine ? ownerEngine : this->
mowner, null_caller, et);
151 #ifdef ORO_SIGNALLING_OPERATIONS 153 impl->setSignal(signal);
167 template<
class Function,
class Object>
171 impl = boost::make_shared<internal::LocalOperationCaller<Signature> >(func, o, ownerEngine ? ownerEngine : this->
mowner, null_caller, et);
172 #ifdef ORO_SIGNALLING_OPERATIONS 174 impl->setSignal(signal);
179 #ifdef ORO_SIGNALLING_OPERATIONS 191 impl = boost::make_shared<internal::LocalOperationCaller<Signature> >( boost::function<Signature>(), this->
mowner, null_caller,
ClientThread);
193 signal = boost::make_shared<internal::Signal<Signature> >();
194 impl->setSignal( signal );
203 Handle signals(boost::function<Signature> func) {
207 impl = boost::make_shared<internal::LocalOperationCaller<Signature> >( boost::function<Signature>(), this->
mowner, null_caller,
ClientThread);
209 signal = boost::make_shared<internal::Signal<Signature> >();
210 impl->setSignal( signal );
212 return signal->connect( func );
221 template<
class Function,
class Object>
222 Handle signals(Function func, Object o) {
232 #ifdef ORO_SIGNALLING_OPERATIONS 243 virtual void ownerUpdated() {
245 impl->setOwner( this->
mowner );
Operation< Signature > & doc(const std::string &description)
Document this operation.
This base class serves as a template-less handle for operation objects and also stores the name and d...
virtual base::OperationCallerBase< Signature >::shared_ptr getOperationCaller()
Operation(const std::string &name, Function func, Object o, ExecutionThread et=ClientThread, ExecutionEngine *ownerEngine=NULL)
Create an operation object with a name and class member function to execute.
virtual const base::DisposableInterface::shared_ptr getImplementation() const
The operation ties a C or C++ function into a component interface.
virtual const base::OperationCallerBase< Signature >::shared_ptr getOperationCaller() const
An execution engine serialises (executes one after the other) the execution of all commands...
Operation & calls(Function func, Object o, ExecutionThread et=ClientThread, ExecutionEngine *ownerEngine=NULL)
Indicate that this operation calls a given class member function.
boost::shared_ptr< Signal< Signature, TSlotFunction > > shared_ptr
boost::shared_ptr< OperationCallerBase< F > > shared_ptr
RTT_API void mdoc(const std::string &description)
Operation< Signature > & arg(const std::string &name, const std::string &description)
Document an argument of this operation.
boost::shared_ptr< DisposableInterface > shared_ptr
Use this type for shared pointer storage of an DisposableInterface object.
virtual base::DisposableInterface::shared_ptr getImplementation()
Returns the implementation object of this operation.
Operation & calls(boost::function< Signature > func, ExecutionThread et=ClientThread, ExecutionEngine *ownerEngine=NULL)
Indicate that this operation calls a given function.
Operation(const std::string &name)
Create an operation object with a name.
Operation(const std::string &name, boost::function< Signature > func, ExecutionThread et=ClientThread, ExecutionEngine *ownerEngine=NULL)
Create an operation object with a name and function to execute.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Very simple factory class to bind a member function to an object pointer and leave the arguments open...
boost::shared_ptr< LocalOperationCaller > shared_ptr
The Handle holds the information, and allows manipulation, of a connection between a internal::Signal...
RTT_API void marg(const std::string &name, const std::string &description)
ExecutionThread
Users can choose if an operation's function is executed in the component's thread (OwnThread) or in t...