Orocos Real-Time Toolkit  2.5.0
Public Types | Public Member Functions | Protected Types | Protected Attributes
RTT::internal::LocalOperationCallerImpl< FunctionT > Class Template Reference

Implements call, send, collect, collectIfDone for all function arities. More...

#include <rtt/internal/LocalOperationCaller.hpp>

Inheritance diagram for RTT::internal::LocalOperationCallerImpl< FunctionT >:
RTT::base::OperationCallerBase< FunctionT > RTT::internal::CollectBase< FunctionT > RTT::internal::BindStorage< FunctionT > RTT::internal::InvokerBase< FunctionT > RTT::base::OperationCallerInterface RTT::base::DisposableInterface

List of all members.

Public Types

typedef FunctionT Signature
typedef boost::function_traits
< Signature >::result_type 
result_type
typedef boost::function_traits
< Signature >::result_type 
result_reference
typedef boost::function_traits
< Signature > 
traits
typedef boost::shared_ptr
< LocalOperationCallerImpl
shared_ptr
 Use this type for shared pointer storage of an OperationCallerInterface object.

Public Member Functions

virtual bool ready () const
 Available such that implementations have a way to expose their ready-ness, ie being able to do the call.
virtual void setExecutor (ExecutionEngine *ee)
 Set an executor which will execute this method when it is called or sent.
virtual void setCaller (ExecutionEngine *ee)
 Sets the caller's engine of this operation.
virtual bool setThread (ExecutionThread et, ExecutionEngine *executor)
 Sets the Thread execution policy of this object.
void executeAndDispose ()
 Execute functionality and free this object.
void dispose ()
 As long as dispose (or executeAndDispose() ) is not called, this object will not be destroyed.
ExecutionEnginegetMessageProcessor () const
SendHandle< Signature > do_send (shared_ptr cl)
SendHandle< Signature > send_impl ()
template<class T1 >
SendHandle< Signature > send_impl (T1 a1)
template<class T1 , class T2 >
SendHandle< Signature > send_impl (T1 a1, T2 a2)
template<class T1 , class T2 , class T3 >
SendHandle< Signature > send_impl (T1 a1, T2 a2, T3 a3)
template<class T1 , class T2 , class T3 , class T4 >
SendHandle< Signature > send_impl (T1 a1, T2 a2, T3 a3, T4 a4)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
SendHandle< Signature > send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
SendHandle< Signature > send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
SendHandle< Signature > send_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
SendStatus collectIfDone_impl ()
template<class T1 >
SendStatus collectIfDone_impl (T1 &a1)
template<class T1 , class T2 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2)
template<class T1 , class T2 , class T3 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3)
template<class T1 , class T2 , class T3 , class T4 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5, T6 &a6)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
SendStatus collectIfDone_impl (T1 &a1, T2 &a2, T3 &a3, T4 &a4, T5 &a5, T6 &a6, T7 &a7)
SendStatus collect_impl ()
template<class T1 >
SendStatus collect_impl (T1 &a1)
template<class T1 , class T2 >
SendStatus collect_impl (T1 &a1, T2 &a2)
template<class T1 , class T2 , class T3 >
SendStatus collect_impl (T1 &a1, T2 &a2, T3 &a3)
result_type call_impl ()
 Invoke this operator if the method has no arguments.
template<class T1 >
result_type call_impl (T1 a1)
 Invoke this operator if the method has one argument.
template<class T1 , class T2 >
result_type call_impl (T1 a1, T2 a2)
template<class T1 , class T2 , class T3 >
result_type call_impl (T1 a1, T2 a2, T3 a3)
template<class T1 , class T2 , class T3 , class T4 >
result_type call_impl (T1 a1, T2 a2, T3 a3, T4 a4)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
result_type call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
result_type call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
result_type call_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
result_type ret_impl ()
template<class T1 >
result_type ret_impl (T1 a1)
 This function has the same signature of call() and returns the stored return value, and tries to return all arguments.
template<class T1 , class T2 >
result_type ret_impl (T1 a1, T2 a2)
template<class T1 , class T2 , class T3 >
result_type ret_impl (T1 a1, T2 a2, T3 a3)
template<class T1 , class T2 , class T3 , class T4 >
result_type ret_impl (T1 a1, T2 a2, T3 a3, T4 a4)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
result_type ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
result_type ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
result_type ret_impl (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
virtual shared_ptr cloneRT () const =0
virtual OperationCallerBase
< FunctionT > * 
cloneI (ExecutionEngine *caller) const =0
 Creates a new clone of this method using operator new().

Protected Types

typedef BindStorage< FunctionT > Store

Protected Attributes

ExecutionEnginemyengine
ExecutionEnginecaller
ExecutionThread met
base::OperationCallerBase
< FunctionT >::shared_ptr 
self
 Used to refcount self as long as dispose() is not called.

Detailed Description

template<class FunctionT>
class RTT::internal::LocalOperationCallerImpl< FunctionT >

Implements call, send, collect, collectIfDone for all function arities.

You can pass arguments by (const) value and by (const) reference. Passing pointers is 'accidentally' supported in-process, it will not work with out-of-process calls. The send takes all arguments (C++ doesn't know pure out args), the collect() only takes the return value and the 'reference' arguments (if any)

If this object is disposed, the collection of results is no longer possible and this will generate a SendFailure at caller side.

Definition at line 78 of file LocalOperationCaller.hpp.


Member Function Documentation

virtual OperationCallerBase<FunctionT >* RTT::base::OperationCallerBase< FunctionT >::cloneI ( ExecutionEngine caller) const [pure virtual, inherited]

Creates a new clone of this method using operator new().

Parameters:
callerThe ExecutionEngine of the task that wishes to call this method.
Returns:
a clone.
template<class FunctionT >
void RTT::internal::LocalOperationCallerImpl< FunctionT >::executeAndDispose ( ) [inline, virtual]

Execute functionality and free this object.

You may no longer use this object after calling this method.

Implements RTT::base::DisposableInterface.

Definition at line 116 of file LocalOperationCaller.hpp.

References RTT::internal::LocalOperationCallerImpl< FunctionT >::dispose(), and RTT::ExecutionEngine::process().

template<class FunctionT >
virtual void RTT::internal::LocalOperationCallerImpl< FunctionT >::setCaller ( ExecutionEngine ee) [inline, virtual]

Sets the caller's engine of this operation.

This object will be used to test if asynchronous messaging is required.

Parameters:
eeThe ExecutionEngine of the component that is calling this operation.

Implements RTT::base::OperationCallerInterface.

Definition at line 103 of file LocalOperationCaller.hpp.

template<class FunctionT >
virtual void RTT::internal::LocalOperationCallerImpl< FunctionT >::setExecutor ( ExecutionEngine ee) [inline, virtual]

Set an executor which will execute this method when it is called or sent.

If ee is set to 0, the method will be executed in the client's thread or the GlobalExecutionEngine.

Parameters:
eeThe ExecutionEngine of the component that is executing this operation.

Implements RTT::base::OperationCallerInterface.

Definition at line 96 of file LocalOperationCaller.hpp.

Referenced by RTT::internal::LocalOperationCallerImpl< FunctionT >::setThread().

template<class FunctionT >
virtual bool RTT::internal::LocalOperationCallerImpl< FunctionT >::setThread ( ExecutionThread  et,
ExecutionEngine executor 
) [inline, virtual]

Sets the Thread execution policy of this object.

Parameters:
etOwnThread or ClientThread.
executorThe engine of the component owning this operation. In case it is not yet owned by a component, executor may be null.
Returns:
false if it may not be modified.

Implements RTT::base::OperationCallerInterface.

Definition at line 110 of file LocalOperationCaller.hpp.

References RTT::internal::LocalOperationCallerImpl< FunctionT >::setExecutor().


Member Data Documentation

template<class FunctionT >
base::OperationCallerBase<FunctionT>::shared_ptr RTT::internal::LocalOperationCallerImpl< FunctionT >::self [protected]

Used to refcount self as long as dispose() is not called.

This refcount is real-time since both shared_ptr and object were allocated with the rt_allocator class.

Definition at line 593 of file LocalOperationCaller.hpp.


The documentation for this class was generated from the following file: