Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | Protected Attributes | List of all members
RTT::base::OperationCallerBase< F > Struct Template Referenceabstract

The base class for all method implementations. More...

#include <rtt/base/OperationCallerBase.hpp>

Inheritance diagram for RTT::base::OperationCallerBase< F >:
RTT::internal::InvokerBase< F > RTT::base::OperationCallerInterface RTT::internal::InvokerBaseImpl< boost::function_traits< F >::arity, F > RTT::base::DisposableInterface

Public Types

typedef boost::shared_ptr< OperationCallerBase< F > > shared_ptr
 

Public Member Functions

virtual ~OperationCallerBase ()
 
virtual OperationCallerBase< F > * cloneI (ExecutionEngine *caller) const =0
 Creates a new clone of this method using operator new(). More...
 
virtual bool ready () const =0
 Available such that implementations have a way to expose their ready-ness, ie being able to do the call. More...
 
virtual void setOwner (ExecutionEngine *ee)
 Set the ExecutionEngine of the task which owns this method. More...
 
virtual void setCaller (ExecutionEngine *ee)
 Sets the caller's engine of this operation. More...
 
bool setThread (ExecutionThread et, ExecutionEngine *executor)
 Sets the Thread execution policy of this object. More...
 
ExecutionThread getThread () const
 
void reportError ()
 Executed when the operation execution resulted in a C++ exception. More...
 
bool isSend ()
 Helpful function to tell us if this operations is to be sent or not. More...
 
ExecutionEnginegetMessageProcessor () const
 
virtual void executeAndDispose ()=0
 Execute functionality and free this object. More...
 
virtual void dispose ()=0
 Just free this object without executing it. More...
 

Protected Attributes

ExecutionEnginemyengine
 
ExecutionEnginecaller
 
ExecutionThread met
 

Detailed Description

template<class F>
struct RTT::base::OperationCallerBase< F >

The base class for all method implementations.

Both local and remote method implementations must inherit from this class.

Definition at line 56 of file OperationCallerBase.hpp.

Member Typedef Documentation

template<class F>
typedef boost::shared_ptr<OperationCallerBase<F> > RTT::base::OperationCallerBase< F >::shared_ptr

Definition at line 60 of file OperationCallerBase.hpp.

Constructor & Destructor Documentation

template<class F>
virtual RTT::base::OperationCallerBase< F >::~OperationCallerBase ( )
inlinevirtual

Definition at line 61 of file OperationCallerBase.hpp.

Member Function Documentation

template<class F>
virtual OperationCallerBase<F>* RTT::base::OperationCallerBase< F >::cloneI ( ExecutionEngine caller) const
pure virtual

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.

Referenced by RTT::base::OperationCallerBase< FunctionT >::~OperationCallerBase().

virtual void RTT::base::DisposableInterface::dispose ( )
pure virtualinherited
virtual void RTT::base::DisposableInterface::executeAndDispose ( )
pure virtualinherited
ExecutionEngine * OperationCallerInterface::getMessageProcessor ( ) const
inherited
ExecutionThread RTT::base::OperationCallerInterface::getThread ( ) const
inlineinherited

Definition at line 67 of file OperationCallerInterface.hpp.

bool OperationCallerInterface::isSend ( )
inherited

Helpful function to tell us if this operations is to be sent or not.

Sending is only required if the operation is OwnThread and in a different thread than the caller.

Definition at line 34 of file OperationCallerInterface.cpp.

References RTT::ClientThread, RTT::ExecutionEngine::isSelf(), RTT::base::OperationCallerInterface::met, and RTT::base::OperationCallerInterface::myengine.

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

virtual bool RTT::base::OperationCallerInterface::ready ( ) const
pure virtualinherited

Available such that implementations have a way to expose their ready-ness, ie being able to do the call.

Implemented in RTT::internal::LocalOperationCallerImpl< FunctionT >.

void OperationCallerInterface::reportError ( )
inherited

Executed when the operation execution resulted in a C++ exception.

Must report the error to the ExecutionEngine of the owner of this operation.

Definition at line 52 of file OperationCallerInterface.cpp.

References RTT::base::OperationCallerInterface::myengine, and RTT::ExecutionEngine::setExceptionTask().

Referenced by RTT::internal::FusedMCallDataSource< Signature >::evaluate(), and RTT::internal::LocalOperationCallerImpl< FunctionT >::executeAndDispose().

void OperationCallerInterface::setCaller ( ExecutionEngine ee)
virtualinherited

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.

Definition at line 24 of file OperationCallerInterface.cpp.

References RTT::base::OperationCallerInterface::caller.

Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), RTT::internal::RemoteOperationCaller< OperationCallerT >::RemoteOperationCaller(), and RTT::internal::RemoteOperationCaller< OperationCallerT >::setCaller().

void OperationCallerInterface::setOwner ( ExecutionEngine ee)
virtualinherited

Set the ExecutionEngine of the task which owns this method.

Parameters
eeThe ExecutionEngine of the component that owns this operation.

Definition at line 20 of file OperationCallerInterface.cpp.

References RTT::base::OperationCallerInterface::myengine.

Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), and RTT::base::OperationCallerInterface::setThread().

bool OperationCallerInterface::setThread ( ExecutionThread  et,
ExecutionEngine executor 
)
inherited

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.

Definition at line 28 of file OperationCallerInterface.cpp.

References RTT::base::OperationCallerInterface::met, and RTT::base::OperationCallerInterface::setOwner().

Referenced by RTT::internal::LocalOperationCaller< bool(std::string) >::LocalOperationCaller(), and RTT::Service::setOperationThread().

Member Data Documentation

ExecutionEngine* RTT::base::OperationCallerInterface::caller
protectedinherited
ExecutionThread RTT::base::OperationCallerInterface::met
protectedinherited
ExecutionEngine* RTT::base::OperationCallerInterface::myengine
protectedinherited

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