Orocos Real-Time Toolkit
2.5.0
|
OperationInterfacePart implementation that uses boost::fusion to produce items. More...
#include <rtt/internal/OperationInterfacePartFused.hpp>
Public Types | |
typedef std::vector < base::DataSourceBase::shared_ptr > | ArgList |
Public Member Functions | |
OperationInterfacePartFusedDS (DataSource< boost::shared_ptr< ObjT > > *wp, Operation< Signature > *o) | |
std::string | resultType () const |
Return the result (return) type of this operation. | |
unsigned int | arity () const |
Returns the arity (number of arguments) of this operation. | |
const types::TypeInfo * | getArgumentType (unsigned int arg) const |
Returns the type information of the n'th argument, with argument zero being the return value. | |
unsigned int | collectArity () const |
Returns the number of collectable arguments of this operation's function. | |
const types::TypeInfo * | getCollectType (unsigned int arg) const |
Returns the type information of the n'th collectable argument. | |
virtual std::string | getName () const |
Returns the name of this operation. | |
virtual std::string | description () const |
Returns the description of this operation. | |
virtual std::vector < ArgumentDescription > | getArgumentList () const |
Get a description of the desired arguments in the ArgumentDescription format. | |
base::DataSourceBase::shared_ptr | produce (ArgList const &args, ExecutionEngine *caller) const |
virtual base::DataSourceBase::shared_ptr | produceSend (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const |
Create a DataSource for a given send operation. | |
virtual base::DataSourceBase::shared_ptr | produceHandle () const |
Create an empty SendHandle object for this operation. | |
virtual base::DataSourceBase::shared_ptr | produceCollect (const std::vector< base::DataSourceBase::shared_ptr > &args, DataSource< bool >::shared_ptr blocking) const |
Create a DataSource for collecting the results of a Send. | |
boost::shared_ptr < base::DisposableInterface > | getLocalOperation () const |
Returns any local operation associated with this operation. | |
virtual base::DataSourceBase::shared_ptr | produce (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0 |
Create a DataSource for a given callable operation. |
OperationInterfacePart implementation that uses boost::fusion to produce items.
The methods invoked get their object pointer from the first data source, which contains a shared_ptr.
Signature | The full signature, with the object pointer as the first argument. |
ObjT | The object pointer type used in Signature. |
Definition at line 291 of file OperationInterfacePartFused.hpp.
unsigned int RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::arity | ( | ) | const [inline, virtual] |
Returns the arity (number of arguments) of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 313 of file OperationInterfacePartFused.hpp.
Referenced by RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::collectArity(), RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getArgumentList(), and RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::produceSend().
unsigned int RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::collectArity | ( | ) | const [inline, virtual] |
Returns the number of collectable arguments of this operation's function.
These consist of the return value and the reference arguments.
Implements RTT::OperationInterfacePart.
Definition at line 322 of file OperationInterfacePartFused.hpp.
References RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::arity().
Referenced by RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::produceCollect().
virtual std::string RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::description | ( | ) | const [inline, virtual] |
Returns the description of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 333 of file OperationInterfacePartFused.hpp.
const types::TypeInfo* RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getArgumentType | ( | unsigned int | arg | ) | const [inline, virtual] |
Returns the type information of the n'th argument, with argument zero being the return value.
arg | 0: get return value type, 1..arity(): get n'th argument type. |
Implements RTT::OperationInterfacePart.
Definition at line 315 of file OperationInterfacePartFused.hpp.
const types::TypeInfo* RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getCollectType | ( | unsigned int | arg | ) | const [inline, virtual] |
Returns the type information of the n'th collectable argument.
The numbering of arg starts from 1.
arg | 1..collectArity(): get n'th argument type. |
Implements RTT::OperationInterfacePart.
Definition at line 324 of file OperationInterfacePartFused.hpp.
boost::shared_ptr<base::DisposableInterface> RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getLocalOperation | ( | ) | const [inline, virtual] |
Returns any local operation associated with this operation.
Reimplemented from RTT::OperationInterfacePart.
Definition at line 407 of file OperationInterfacePartFused.hpp.
virtual std::string RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::getName | ( | ) | const [inline, virtual] |
Returns the name of this operation.
Implements RTT::OperationInterfacePart.
Definition at line 329 of file OperationInterfacePartFused.hpp.
virtual base::DataSourceBase::shared_ptr RTT::OperationInterfacePart::produce | ( | const std::vector< base::DataSourceBase::shared_ptr > & | args, |
ExecutionEngine * | caller | ||
) | const [pure virtual, inherited] |
Create a DataSource for a given callable operation.
args | The arguments for the target object's function. The number of arguments must be identical to this->arity() |
caller | The Engine that will receive notifications when the method has been executed, in case it runs in the owner's thread. Normally, this is the engine of the caller's TaskContext. |
Implemented in RTT::internal::SynchronousOperationInterfacePartFused< Signature >, RTT::internal::OperationInterfacePartFused< Signature >, RTT::corba::CorbaOperationCallerFactory, and RTT::scripting::FunctionFactory.
virtual base::DataSourceBase::shared_ptr RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::produceCollect | ( | const std::vector< base::DataSourceBase::shared_ptr > & | args, |
DataSource< bool >::shared_ptr | blocking | ||
) | const [inline, virtual] |
Create a DataSource for collecting the results of a Send.
args | A vector of data sources of which the first element contains a properly initialised sendhandle and the remainder of the elements contains datasources for collecting the return value and reference arguments. The total number of items in args must be collectArity() + 1 |
blocking | Set to true to do a blocking collect, false for a polling version. |
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implements RTT::OperationInterfacePart.
Definition at line 374 of file OperationInterfacePartFused.hpp.
References RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::collectArity().
virtual base::DataSourceBase::shared_ptr RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::produceHandle | ( | ) | const [inline, virtual] |
Create an empty SendHandle object for this operation.
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implements RTT::OperationInterfacePart.
Definition at line 369 of file OperationInterfacePartFused.hpp.
virtual base::DataSourceBase::shared_ptr RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::produceSend | ( | const std::vector< base::DataSourceBase::shared_ptr > & | args, |
ExecutionEngine * | caller | ||
) | const [inline, virtual] |
Create a DataSource for a given send operation.
args | The arguments for the target object's function. The number of arguments must be identical to this->arity() |
caller | The Engine that will receive notifications when the method has been executed. Normally, this is the engine of the caller's TaskContext. |
wrong_number_of_args_exception | |
wrong_types_of_args_exception | |
name_not_found_exception | |
no_asynchronous_operation_exception |
Implements RTT::OperationInterfacePart.
Definition at line 358 of file OperationInterfacePartFused.hpp.
References RTT::internal::OperationInterfacePartFusedDS< Signature, ObjT >::arity().