Orocos Real-Time Toolkit  2.9.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RTT::base::OperationBase Class Referenceabstract

This base class serves as a template-less handle for operation objects and also stores the name and documentation of an operation. More...

#include <rtt/base/OperationBase.hpp>

Inheritance diagram for RTT::base::OperationBase:
RTT::Operation< bool(std::string) > RTT::Operation< bool(std::string)> RTT::Operation< Signature >

Public Member Functions

RTT_API OperationBase (const std::string &name)
 
virtual RTT_API ~OperationBase ()
 
const std::string & getName ()
 Returns the name of this operation. More...
 
const std::vector< std::string > & getDescriptions ()
 Returns all the documented descriptions of this operation, as a single list, starting with the operation's description, followed by the name, description pairs of each argument. More...
 
virtual DisposableInterface::shared_ptr getImplementation ()=0
 Returns the implementation object of this operation. More...
 
virtual const DisposableInterface::shared_ptr getImplementation () const =0
 
bool ready () const
 An operation is ready if it has an implementation and is present in a TaskContext. More...
 
void setOwner (ExecutionEngine *ee)
 Updates the owning ExecutionEngine that might execute this operation. More...
 
ExecutionEnginegetOwner () const
 

Protected Member Functions

RTT_API void mdoc (const std::string &description)
 
RTT_API void marg (const std::string &name, const std::string &description)
 
virtual void ownerUpdated ()=0
 

Protected Attributes

std::string mname
 
std::vector< std::string > descriptions
 
ExecutionEnginemowner
 

Detailed Description

This base class serves as a template-less handle for operation objects and also stores the name and documentation of an operation.

Definition at line 67 of file OperationBase.hpp.

Constructor & Destructor Documentation

RTT::base::OperationBase::OperationBase ( const std::string &  name)

Definition at line 54 of file OperationBase.cpp.

References descriptions.

RTT::base::OperationBase::~OperationBase ( )
virtual

Definition at line 60 of file OperationBase.cpp.

Member Function Documentation

const std::vector<std::string>& RTT::base::OperationBase::getDescriptions ( )
inline

Returns all the documented descriptions of this operation, as a single list, starting with the operation's description, followed by the name, description pairs of each argument.

In case no argument was documented, only the description of the operation is returned.

Returns
A vector with all documented descriptions.

Definition at line 93 of file OperationBase.hpp.

References descriptions, and getImplementation().

Referenced by RTT::internal::OperationInterfacePartHelper::description(), RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::description(), RTT::internal::OperationInterfacePartHelper::getArgumentList(), and RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getArgumentList().

virtual DisposableInterface::shared_ptr RTT::base::OperationBase::getImplementation ( )
pure virtual

Returns the implementation object of this operation.

Returns

Implemented in RTT::Operation< Signature >, RTT::Operation< bool(std::string)>, and RTT::Operation< bool(std::string) >.

Referenced by RTT::Service::addLocalOperation(), getDescriptions(), and ready().

virtual const DisposableInterface::shared_ptr RTT::base::OperationBase::getImplementation ( ) const
pure virtual
const std::string& RTT::base::OperationBase::getName ( )
inline
ExecutionEngine* RTT::base::OperationBase::getOwner ( ) const
inline

Definition at line 122 of file OperationBase.hpp.

References mowner.

void RTT::base::OperationBase::marg ( const std::string &  name,
const std::string &  description 
)
protected

Definition at line 68 of file OperationBase.cpp.

References descriptions.

Referenced by RTT::Operation< bool(std::string) >::arg().

void RTT::base::OperationBase::mdoc ( const std::string &  description)
protected

Definition at line 64 of file OperationBase.cpp.

References descriptions.

Referenced by RTT::Operation< bool(std::string) >::doc().

virtual void RTT::base::OperationBase::ownerUpdated ( )
protectedpure virtual

Referenced by setOwner().

bool RTT::base::OperationBase::ready ( ) const
inline

An operation is ready if it has an implementation and is present in a TaskContext.

Returns
true if ready.

Definition at line 108 of file OperationBase.hpp.

References getImplementation().

void RTT::base::OperationBase::setOwner ( ExecutionEngine ee)
inline

Updates the owning ExecutionEngine that might execute this operation.

Parameters
ee

Definition at line 116 of file OperationBase.hpp.

References ownerUpdated().

Referenced by RTT::Service::addLocalOperation().

Member Data Documentation

std::vector<std::string> RTT::base::OperationBase::descriptions
protected

Definition at line 71 of file OperationBase.hpp.

Referenced by getDescriptions(), marg(), mdoc(), and OperationBase().

std::string RTT::base::OperationBase::mname
protected

Definition at line 70 of file OperationBase.hpp.

Referenced by getName().

ExecutionEngine* RTT::base::OperationBase::mowner
protected

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