RTT::scripting::FunctionFactory Class Reference

#include <FunctionFactory.hpp>

Inheritance diagram for RTT::scripting::FunctionFactory:
Inheritance graph
[legend]

List of all members.

Public Member Functions

unsigned int arity () const
unsigned int arity () const
unsigned int collectArity () const
unsigned int collectArity () const
std::string description () const
std::string description () const
 FunctionFactory (ProgramInterfacePtr func, ExecutionEngine *procs)
 FunctionFactory (ProgramInterfacePtr func, ExecutionEngine *procs)
std::vector< ArgumentDescriptiongetArgumentList () const
std::vector< ArgumentDescriptiongetArgumentList () const
const types::TypeInfogetArgumentType (unsigned int arg) const
const types::TypeInfogetArgumentType (unsigned int arg) const
const types::TypeInfogetCollectType (unsigned int arg) const
const types::TypeInfogetCollectType (unsigned int arg) const
std::string getName () const
std::string getName () const
base::DataSourceBase::shared_ptr produce (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produce (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produceCollect (const std::vector< base::DataSourceBase::shared_ptr > &args, internal::DataSource< bool >::shared_ptr blocking) const
base::DataSourceBase::shared_ptr produceCollect (const std::vector< base::DataSourceBase::shared_ptr > &args, internal::DataSource< bool >::shared_ptr blocking) const
base::DataSourceBase::shared_ptr produceHandle () const
base::DataSourceBase::shared_ptr produceHandle () const
base::DataSourceBase::shared_ptr produceSend (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const
base::DataSourceBase::shared_ptr produceSend (const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const
Handle produceSignal (base::ActionInterface *func, const std::vector< base::DataSourceBase::shared_ptr > &args) const
Handle produceSignal (base::ActionInterface *func, const std::vector< base::DataSourceBase::shared_ptr > &args) const
std::string resultType () const
std::string resultType () const

Private Attributes

ProgramInterfacePtr func
ExecutionEngineproc

Detailed Description

A Factory which delivers operations which execute a FunctionGraph in an engine..

Definition at line 57 of file install/include/rtt/scripting/FunctionFactory.hpp.


Constructor & Destructor Documentation

RTT::FunctionFactory::FunctionFactory ( ProgramInterfacePtr  func,
ExecutionEngine procs 
)

Definition at line 50 of file FunctionFactory.cpp.

RTT::scripting::FunctionFactory::FunctionFactory ( ProgramInterfacePtr  func,
ExecutionEngine procs 
)

Member Function Documentation

unsigned int RTT::scripting::FunctionFactory::arity (  )  const [virtual]

Returns the arity (number of arguments) of this operation.

See also:
produce, produceSend

Implements RTT::OperationInterfacePart.

unsigned int RTT::FunctionFactory::arity (  )  const [virtual]

Returns the arity (number of arguments) of this operation.

See also:
produce, produceSend

Implements RTT::OperationInterfacePart.

Definition at line 75 of file FunctionFactory.cpp.

unsigned int RTT::scripting::FunctionFactory::collectArity (  )  const [virtual]

Returns the number of collectable arguments of this operation's function. These consist of the return value and the reference arguments.

See also:
produceCollect

Implements RTT::OperationInterfacePart.

unsigned int RTT::FunctionFactory::collectArity (  )  const [virtual]

Returns the number of collectable arguments of this operation's function. These consist of the return value and the reference arguments.

See also:
produceCollect

Implements RTT::OperationInterfacePart.

Definition at line 80 of file FunctionFactory.cpp.

std::string RTT::scripting::FunctionFactory::description (  )  const [virtual]

Returns the description of this operation.

Returns:

Implements RTT::OperationInterfacePart.

std::string RTT::FunctionFactory::description (  )  const [virtual]

Returns the description of this operation.

Returns:

Implements RTT::OperationInterfacePart.

Definition at line 61 of file FunctionFactory.cpp.

std::vector< ArgumentDescription > RTT::scripting::FunctionFactory::getArgumentList (  )  const [virtual]

Get a description of the desired arguments in the ArgumentDescription format.

Implements RTT::OperationInterfacePart.

std::vector< ArgumentDescription > RTT::FunctionFactory::getArgumentList (  )  const [virtual]

Get a description of the desired arguments in the ArgumentDescription format.

Implements RTT::OperationInterfacePart.

Definition at line 65 of file FunctionFactory.cpp.

const types::TypeInfo* RTT::scripting::FunctionFactory::getArgumentType ( unsigned int  arg  )  const [virtual]

Returns the type information of the n'th argument, with argument zero being the return value.

Parameters:
arg 0: get return value type, 1..arity(): get n'th argument type.
Returns:
A TypeInfo Object or null if
  • is out of range

Implements RTT::OperationInterfacePart.

const types::TypeInfo * RTT::FunctionFactory::getArgumentType ( unsigned int  arg  )  const [virtual]

Returns the type information of the n'th argument, with argument zero being the return value.

Parameters:
arg 0: get return value type, 1..arity(): get n'th argument type.
Returns:
A TypeInfo Object or null if
  • is out of range

Implements RTT::OperationInterfacePart.

Definition at line 85 of file FunctionFactory.cpp.

const types::TypeInfo* RTT::scripting::FunctionFactory::getCollectType ( unsigned int  arg  )  const [virtual]

Returns the type information of the n'th collectable argument. The numbering of arg starts from 1.

Parameters:
arg 1..collectArity(): get n'th argument type.
Returns:
A TypeInfo Object or null if
  • is out of range

Implements RTT::OperationInterfacePart.

const types::TypeInfo * RTT::FunctionFactory::getCollectType ( unsigned int  arg  )  const [virtual]

Returns the type information of the n'th collectable argument. The numbering of arg starts from 1.

Parameters:
arg 1..collectArity(): get n'th argument type.
Returns:
A TypeInfo Object or null if
  • is out of range

Implements RTT::OperationInterfacePart.

Definition at line 99 of file FunctionFactory.cpp.

std::string RTT::scripting::FunctionFactory::getName (  )  const [virtual]

Returns the name of this operation.

Returns:

Implements RTT::OperationInterfacePart.

std::string RTT::FunctionFactory::getName (  )  const [virtual]

Returns the name of this operation.

Returns:

Implements RTT::OperationInterfacePart.

Definition at line 57 of file FunctionFactory.cpp.

base::DataSourceBase::shared_ptr RTT::scripting::FunctionFactory::produce ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
ExecutionEngine caller 
) const [virtual]

Create a DataSource for a given callable operation.

Parameters:
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.
Returns:
a DataSource which will return the result of this operation.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 

Implements RTT::OperationInterfacePart.

base::DataSourceBase::shared_ptr RTT::scripting::FunctionFactory::produce ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
ExecutionEngine caller 
) const [virtual]

Create a DataSource for a given callable operation.

Parameters:
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.
Returns:
a DataSource which will return the result of this operation.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 

Implements RTT::OperationInterfacePart.

base::DataSourceBase::shared_ptr RTT::scripting::FunctionFactory::produceCollect ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
internal::DataSource< bool >::shared_ptr  blocking 
) const [virtual]

Create a DataSource for collecting the results of a Send.

Parameters:
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.
Returns:
A DataSource which collects the results when evaluated and which returns the SendStatus.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

base::DataSourceBase::shared_ptr RTT::FunctionFactory::produceCollect ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
internal::DataSource< bool >::shared_ptr  blocking 
) const [virtual]

Create a DataSource for collecting the results of a Send.

Parameters:
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.
Returns:
A DataSource which collects the results when evaluated and which returns the SendStatus.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

Definition at line 176 of file FunctionFactory.cpp.

base::DataSourceBase::shared_ptr RTT::scripting::FunctionFactory::produceHandle (  )  const [virtual]

Create an empty SendHandle object for this operation.

Returns:
a DataSource which contains an empty SendHandle.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

base::DataSourceBase::shared_ptr RTT::FunctionFactory::produceHandle (  )  const [virtual]

Create an empty SendHandle object for this operation.

Returns:
a DataSource which contains an empty SendHandle.
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

Definition at line 165 of file FunctionFactory.cpp.

base::DataSourceBase::shared_ptr RTT::scripting::FunctionFactory::produceSend ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
ExecutionEngine caller 
) const [virtual]

Create a DataSource for a given send operation.

Parameters:
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.
Returns:
a DataSource which contains the SendHandle of this operation.
See also:
produceHandle
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

base::DataSourceBase::shared_ptr RTT::FunctionFactory::produceSend ( const std::vector< base::DataSourceBase::shared_ptr > &  args,
ExecutionEngine caller 
) const [virtual]

Create a DataSource for a given send operation.

Parameters:
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.
Returns:
a DataSource which contains the SendHandle of this operation.
See also:
produceHandle
Exceptions:
wrong_number_of_args_exception 
wrong_types_of_args_exception 
name_not_found_exception 
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

Definition at line 170 of file FunctionFactory.cpp.

Handle RTT::scripting::FunctionFactory::produceSignal ( base::ActionInterface func,
const std::vector< base::DataSourceBase::shared_ptr > &  args 
) const [virtual]

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

Parameters:
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 valid Signal Handle if the arguments were valid.
Exceptions:
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

Handle RTT::FunctionFactory::produceSignal ( base::ActionInterface func,
const std::vector< base::DataSourceBase::shared_ptr > &  args 
) const [virtual]

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

Parameters:
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 valid Signal Handle if the arguments were valid.
Exceptions:
no_asynchronous_operation_exception 

Implements RTT::OperationInterfacePart.

Definition at line 185 of file FunctionFactory.cpp.

std::string RTT::scripting::FunctionFactory::resultType (  )  const [virtual]

Return the result (return) type of this operation.

Implements RTT::OperationInterfacePart.

std::string RTT::FunctionFactory::resultType (  )  const [virtual]

Return the result (return) type of this operation.

Implements RTT::OperationInterfacePart.

Definition at line 53 of file FunctionFactory.cpp.


Member Data Documentation


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:50:14 2013