RTT::OperationInterface Class Reference
[Operation InterfaceService Interface]

Holds all exported operations of a component and is able to produce callers for these operations. More...

#include <OperationInterface.hpp>

Inheritance diagram for RTT::OperationInterface:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector
< base::DataSourceBase::shared_ptr
Arguments
typedef std::vector
< base::DataSourceBase::shared_ptr
Arguments
typedef std::vector
< ArgumentDescription
Descriptions
typedef std::vector
< ArgumentDescription
Descriptions

Public Member Functions

void add (const std::string &name, OperationInterfacePart *part)
void add (const std::string &name, OperationInterfacePart *part)
void clear ()
void clear ()
Descriptions getArgumentList (const std::string &name) const
Descriptions getArgumentList (const std::string &name) const
int getArity (const std::string &name) const
int getArity (const std::string &name) const
int getCollectArity (const std::string &name) const
int getCollectArity (const std::string &name) const
std::string getDescription (const std::string &name) const
std::string getDescription (const std::string &name) const
std::vector< std::string > getNames () const
std::vector< std::string > getNames () const
OperationInterfacePartgetPart (const std::string &name)
OperationInterfacePartgetPart (const std::string &name)
std::string getResultType (const std::string &name) const
std::string getResultType (const std::string &name) const
bool hasMember (const std::string &name) const
bool hasMember (const std::string &name) const
bool isSynchronous (const std::string &name) const
bool isSynchronous (const std::string &name) const
base::DataSourceBase::shared_ptr produce (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produce (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produceCollect (const std::string &name, const Arguments &args, internal::DataSource< bool >::shared_ptr blocking) const
base::DataSourceBase::shared_ptr produceCollect (const std::string &name, const Arguments &args, internal::DataSource< bool >::shared_ptr blocking) const
base::DataSourceBase::shared_ptr produceHandle (const std::string &name) const
base::DataSourceBase::shared_ptr produceHandle (const std::string &name) const
base::DataSourceBase::shared_ptr produceSend (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produceSend (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
Handle produceSignal (const std::string &name, base::ActionInterface *func, const std::vector< base::DataSourceBase::shared_ptr > &args) const
Handle produceSignal (const std::string &name, base::ActionInterface *func, const std::vector< base::DataSourceBase::shared_ptr > &args) const
void remove (const std::string &name)
void remove (const std::string &name)

Protected Types

typedef std::map< std::string,
OperationInterfacePart * > 
map_t
typedef std::map< std::string,
OperationInterfacePart * > 
map_t

Protected Attributes

map_t data

Detailed Description

Holds all exported operations of a component and is able to produce callers for these operations.

Definition at line 62 of file install/include/rtt/OperationInterface.hpp.


Member Typedef Documentation

The arguments for an operation.

Definition at line 71 of file rtt/OperationInterface.hpp.

The arguments for an operation.

Definition at line 71 of file install/include/rtt/OperationInterface.hpp.

The descriptions of an argumentlist.

Definition at line 200 of file rtt/OperationInterface.hpp.

The descriptions of an argumentlist.

Definition at line 200 of file install/include/rtt/OperationInterface.hpp.

typedef std::map<std::string, OperationInterfacePart*> RTT::OperationInterface::map_t [protected]

Definition at line 65 of file rtt/OperationInterface.hpp.

typedef std::map<std::string, OperationInterfacePart*> RTT::OperationInterface::map_t [protected]

Definition at line 65 of file install/include/rtt/OperationInterface.hpp.


Member Function Documentation

void RTT::OperationInterface::add ( const std::string &  name,
OperationInterfacePart part 
)

Add a new operation to the interface or replace an existing one.

Parameters:
name The name of the operation
part A part which creates the operation.
void OperationInterface::add ( const std::string &  name,
OperationInterfacePart part 
)

Add a new operation to the interface or replace an existing one.

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

Definition at line 169 of file OperationInterface.cpp.

void RTT::OperationInterface::clear (  ) 

Remove and delete all added operations.

Reimplemented in RTT::scripting::ScriptingService, RTT::Service, RTT::scripting::ScriptingService, and RTT::Service.

void OperationInterface::clear (  ) 

Remove and delete all added operations.

Reimplemented in RTT::scripting::ScriptingService, RTT::Service, RTT::scripting::ScriptingService, and RTT::Service.

Definition at line 58 of file OperationInterface.cpp.

Descriptions RTT::OperationInterface::getArgumentList ( const std::string &  name  )  const

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

Parameters:
name The name of the operation
Returns:
A list of descriptions.
Exceptions:
name_not_found_exception 
OperationInterface::Descriptions OperationInterface::getArgumentList ( const std::string &  name  )  const

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

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

Definition at line 145 of file OperationInterface.cpp.

int RTT::OperationInterface::getArity ( const std::string &  name  )  const

Query the number of arguments of an operation. These are the number of function arguments, not counting the return value.

Parameters:
name The name of the operation
Returns:
The arity, or -1 if name is not found.
int OperationInterface::getArity ( const std::string &  name  )  const

Query the number of arguments of an operation. These are the number of function arguments, not counting the return value.

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

Definition at line 77 of file OperationInterface.cpp.

int RTT::OperationInterface::getCollectArity ( const std::string &  name  )  const

Query the collectable number of arguments of an operation. These are the return value (if non void) and each non-const reference argument of the operation.

Parameters:
name The name of the operation
Returns:
The arity, or -1 if name is not found.
int OperationInterface::getCollectArity ( const std::string &  name  )  const

Query the collectable number of arguments of an operation. These are the return value (if non void) and each non-const reference argument of the operation.

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

Definition at line 85 of file OperationInterface.cpp.

std::string RTT::OperationInterface::getDescription ( const std::string &  name  )  const

Get the description of an operation

Parameters:
name The name of the operation
Returns:
A user readable description.
Exceptions:
name_not_found_exception 
std::string OperationInterface::getDescription ( const std::string &  name  )  const

Get the description of an operation

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

Definition at line 161 of file OperationInterface.cpp.

std::vector<std::string> RTT::OperationInterface::getNames (  )  const

Get a list of all the names of the added operations.

std::vector< std::string > OperationInterface::getNames (  )  const

Get a list of all the names of the added operations.

Definition at line 65 of file OperationInterface.cpp.

OperationInterfacePart* RTT::OperationInterface::getPart ( const std::string &  name  ) 

Get a previously added part of this factory.

Parameters:
name 
Returns:
OperationInterfacePart * OperationInterface::getPart ( const std::string &  name  ) 

Get a previously added part of this factory.

Parameters:
name 
Returns:

Definition at line 187 of file OperationInterface.cpp.

std::string RTT::OperationInterface::getResultType ( const std::string &  name  )  const

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.
Exceptions:
name_not_found_exception 
std::string OperationInterface::getResultType ( const std::string &  name  )  const

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.
Exceptions:
name_not_found_exception 

Definition at line 153 of file OperationInterface.cpp.

bool RTT::OperationInterface::hasMember ( const std::string &  name  )  const

Query if an operation is present.

bool OperationInterface::hasMember ( const std::string &  name  )  const

Query if an operation is present.

Definition at line 72 of file OperationInterface.cpp.

bool RTT::OperationInterface::isSynchronous ( const std::string &  name  )  const

Query if a given operation is limited to sychronous invocation (own component thread) only.

Returns:
false if name not found or a normal operation, true if name exists but is synchronous.
bool OperationInterface::isSynchronous ( const std::string &  name  )  const

Query if a given operation is limited to sychronous invocation (own component thread) only.

Returns:
false if name not found or a normal operation, true if name exists but is synchronous.

Definition at line 93 of file OperationInterface.cpp.

base::DataSourceBase::shared_ptr RTT::OperationInterface::produce ( const std::string &  name,
const Arguments args,
ExecutionEngine caller 
) const

Produce a DataSource that call()s an operation. The DataSource will return the result of call().

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
base::DataSourceBase::shared_ptr OperationInterface::produce ( const std::string &  name,
const Arguments args,
ExecutionEngine caller 
) const

Produce a DataSource that call()s an operation. The DataSource will return the result of call().

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

Definition at line 105 of file OperationInterface.cpp.

base::DataSourceBase::shared_ptr RTT::OperationInterface::produceCollect ( const std::string &  name,
const Arguments args,
internal::DataSource< bool >::shared_ptr  blocking 
) const

Produce a DataSource that collects a sent operation, The DataSource will return the SendStatus and store the results in the presented arguments. Note that this function takes most of the time less arguments than its companions.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
blocking Set to true to block on the result.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 
base::DataSourceBase::shared_ptr OperationInterface::produceCollect ( const std::string &  name,
const Arguments args,
internal::DataSource< bool >::shared_ptr  blocking 
) const

Produce a DataSource that collects a sent operation, The DataSource will return the SendStatus and store the results in the presented arguments. Note that this function takes most of the time less arguments than its companions.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
blocking Set to true to block on the result.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Definition at line 129 of file OperationInterface.cpp.

base::DataSourceBase::shared_ptr RTT::OperationInterface::produceHandle ( const std::string &  name  )  const

Produce an AssignableDataSource that contains a SendHandle, fit for the operation. The DataSource will return the SendHandle.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 
base::DataSourceBase::shared_ptr OperationInterface::produceHandle ( const std::string &  name  )  const

Produce an AssignableDataSource that contains a SendHandle, fit for the operation. The DataSource will return the SendHandle.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Definition at line 121 of file OperationInterface.cpp.

base::DataSourceBase::shared_ptr RTT::OperationInterface::produceSend ( const std::string &  name,
const Arguments args,
ExecutionEngine caller 
) const

Produce a DataSource that send()s an operation. The DataSource will return the SendHandle of that operation.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 
base::DataSourceBase::shared_ptr OperationInterface::produceSend ( const std::string &  name,
const Arguments args,
ExecutionEngine caller 
) const

Produce a DataSource that send()s an operation. The DataSource will return the SendHandle of that operation.

Parameters:
name The name of the operation
args The arguments filled in as data sources.
Returns:
a new object
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Definition at line 113 of file OperationInterface.cpp.

Handle RTT::OperationInterface::produceSignal ( const std::string &  name,
base::ActionInterface func,
const std::vector< base::DataSourceBase::shared_ptr > &  args 
) const

Attach a Signal Handle to this operation which fills in the given data sources and executes a given function.

Parameters:
name The name of the operation
func The function to execute
args The data sources to fill in with the arguments the operation was given. The number of elements and their type must match the signature of the operation.
Returns:
a new Signal Handle
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 
Handle RTT::OperationInterface::produceSignal ( const std::string &  name,
base::ActionInterface func,
const std::vector< base::DataSourceBase::shared_ptr > &  args 
) const

Attach a Signal Handle to this operation which fills in the given data sources and executes a given function.

Parameters:
name The name of the operation
func The function to execute
args The data sources to fill in with the arguments the operation was given. The number of elements and their type must match the signature of the operation.
Returns:
a new Signal Handle
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 
void RTT::OperationInterface::remove ( const std::string &  name  ) 

Remove an added operation from the interface

Parameters:
name The name of the operation
void OperationInterface::remove ( const std::string &  name  ) 

Remove an added operation from the interface

Parameters:
name The name of the operation

Definition at line 177 of file OperationInterface.cpp.


Member Data Documentation

Definition at line 66 of file install/include/rtt/OperationInterface.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:47 2013