RTT::OperationFactory< ResultT > Class Template Reference

This factory is a template for creating parts. More...

#include <rtt/OperationFactory.hpp>

List of all members.

Public Types

typedef std::vector
< ArgumentDescription
Descriptions
 The descriptions of an argumentlist.
typedef std::vector
< DataSourceBase::shared_ptr
Arguments
 The arguments for an operation.

Public Member Functions

void clear ()
 Remove and delete all added operations.
std::vector< std::string > getNames () const
 Get a list of all the names of the added operations.
bool hasMember (const std::string &name) const
 Query if an operation is present.
int getArity (const std::string &name) const
 Query the number of arguments of an operation.
ResultT produce (const std::string &name, const PropertyBag &args) const
 Produce an object that contains an operation.
ResultT produce (const std::string &name, const std::vector< DataSourceBase::shared_ptr > &args) const
 Produce an object that contains an operation.
Descriptions getArgumentList (const std::string &name) const
 Get the names and descriptions of all arguments of an operation.
std::string getResultType (const std::string &name) const
 Get the type name of the result type of an operation.
std::string getDescription (const std::string &name) const
 Get the description of an operation.
void add (const std::string &name, detail::OperationFactoryPart< ResultT > *part)
 Add a new operation to the interface.
void remove (const std::string &name)
 Remove an added operation from the interface.

Protected Types

typedef std::map< std::string,
detail::OperationFactoryPart
< ResultT > * > 
map_t

Protected Attributes

map_t data

Detailed Description

template<typename ResultT>
class RTT::OperationFactory< ResultT >

This factory is a template for creating parts.

Definition at line 416 of file OperationFactory.hpp.


Member Function Documentation

template<typename ResultT>
void RTT::OperationFactory< ResultT >::add ( const std::string &  name,
detail::OperationFactoryPart< ResultT > *  part 
) [inline]

Add a new operation to the interface.

Parameters:
name The name of the operation
part A part which creates the operation.

Definition at line 557 of file OperationFactory.hpp.

template<typename ResultT>
Descriptions RTT::OperationFactory< ResultT >::getArgumentList ( const std::string &  name  )  const [inline]

Get the names and descriptions of all arguments of an operation.

Parameters:
name The name of the operation
Returns:
A list of descriptions.

Definition at line 516 of file OperationFactory.hpp.

template<typename ResultT>
int RTT::OperationFactory< ResultT >::getArity ( const std::string &  name  )  const [inline]

Query the number of arguments of an operation.

Parameters:
name The name of the operation
Returns:
The arity, or -1 if name is not found.

Definition at line 468 of file OperationFactory.hpp.

template<typename ResultT>
std::string RTT::OperationFactory< ResultT >::getDescription ( const std::string &  name  )  const [inline]

Get the description of an operation.

Parameters:
name The name of the operation
Returns:
A user readable description.

Definition at line 544 of file OperationFactory.hpp.

template<typename ResultT>
std::string RTT::OperationFactory< ResultT >::getResultType ( const std::string &  name  )  const [inline]

Get the type name of the result type of an operation.

Parameters:
name The name of the operation
Returns:
A name of a data type.

Definition at line 530 of file OperationFactory.hpp.

template<typename ResultT>
ResultT RTT::OperationFactory< ResultT >::produce ( const std::string &  name,
const std::vector< DataSourceBase::shared_ptr > &  args 
) const [inline]

Produce an object that contains an operation.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object

Definition at line 501 of file OperationFactory.hpp.

template<typename ResultT>
ResultT RTT::OperationFactory< ResultT >::produce ( const std::string &  name,
const PropertyBag args 
) const [inline]

Produce an object that contains an operation.

Parameters:
name The name of the operation
args The arguments filled in as properties.
Returns:
a new object.

Definition at line 482 of file OperationFactory.hpp.

template<typename ResultT>
void RTT::OperationFactory< ResultT >::remove ( const std::string &  name  )  [inline]

Remove an added operation from the interface.

Parameters:
name The name of the operation

Definition at line 572 of file OperationFactory.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:43 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3