#include <rtt/CommandRepository.hpp>

Definition at line 61 of file CommandRepository.hpp.
Public Types | |
| typedef CommandFactory | Factory |
|
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 | |
| ~CommandRepository () | |
| template<class Signature> | |
| DispatchInterface * | getCommand (std::string name) |
| Return the pointer to an added command for use in a Command object. | |
| void | clear () |
| Clears the complete interface and frees all memory. | |
| std::vector < std::string > | getCommands () const |
| Returns the names of all commands added to this interface. | |
| bool | hasCommand (const std::string &name) const |
| Query for the existence of a Command in this interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT *com) |
| Add a Command object to the command interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT com, const char *description) |
| Add a Command object, which takes no arguments, to the command interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT com, const char *description, const char *arg1, const char *arg1_description) |
| Add a Command object, which takes one argument, to the command interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT com, const char *description, const char *arg1, const char *arg1_description, const char *arg2, const char *arg2_description) |
| Add a Command object, which takes two arguments, to the command interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT com, const char *description, const char *arg1, const char *arg1_description, const char *arg2, const char *arg2_description, const char *arg3, const char *arg3_description) |
| Add a Command object, which takes three arguments, to the command interface. | |
| template<class CommandT> | |
| bool | addCommand (CommandT com, const char *description, const char *arg1, const char *arg1_description, const char *arg2, const char *arg2_description, const char *arg3, const char *arg3_description, const char *arg4, const char *arg4_description) |
| Add a Command object, which takes four arguments, to the command interface. | |
| DispatchInterface * | getCommand (std::string name, const std::vector< DataSourceBase::shared_ptr > &args) const |
| For internal use only. | |
| template<class CommandT, class CompT> | |
| bool | addCommandDS (DataSource< boost::weak_ptr< CompT > > *wp, CommandT c, const char *description) |
| For internal use only. | |
| template<class CommandT, class CompT> | |
| bool | addCommandDS (DataSource< boost::weak_ptr< CompT > > *wp, CommandT c, const char *description, const char *arg1, const char *arg1_description) |
| For internal use only. | |
| ConditionInterface * | getCondition (std::string name, const std::vector< DataSourceBase::shared_ptr > &args) const |
| For internal use Only. | |
| CommandC | create (std::string name) |
| Create a CommandC container object, which can be used to access an added Command. | |
|
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 |
| DispatchInterface* getCommand | ( | std::string | name | ) | [inline] |
Return the pointer to an added command for use in a Command object.
Store the result in a Command<Signature> object.
| name | The name of the command to retrieve. | |
| Signature | The function signature of the command, for example: getCommand<bool(int,double)>("name"); |
Definition at line 93 of file CommandRepository.hpp.
References RTT::Error, and RTT::Warning.
| std::vector<std::string> getCommands | ( | ) | const [inline] |
Returns the names of all commands added to this interface.
Definition at line 128 of file CommandRepository.hpp.
References RTT::keys().
| bool hasCommand | ( | const std::string & | name | ) | const [inline] |
Query for the existence of a Command in this interface.
Definition at line 136 of file CommandRepository.hpp.
| bool addCommand | ( | CommandT * | com | ) | [inline] |
Add a Command object to the command interface.
The command is added to the C++ interface and not added to the scripting interface.
| com | A pointer to a Command object. |
Definition at line 150 of file CommandRepository.hpp.
References RTT::Debug, and RTT::Error.
Referenced by ParserExecutionAccess::ParserExecutionAccess().
| bool addCommand | ( | CommandT | com, | |
| const char * | description | |||
| ) | [inline] |
Add a Command object, which takes no arguments, to the command interface.
The command is added to the C++ and to the scripting interface.
| c | A pointer to the existing command. | |
| description | A user readable description of what this command does. |
Definition at line 177 of file CommandRepository.hpp.
References RTT::Error, LocalCommand::getCommandFunction(), and LocalCommand::getConditionFunction().
| bool addCommand | ( | CommandT | com, | |
| const char * | description, | |||
| const char * | arg1, | |||
| const char * | arg1_description | |||
| ) | [inline] |
Add a Command object, which takes one argument, to the command interface.
The command is added to the C++ and to the scripting interface.
| c | A pointer to the existing command. | |
| description | A user readable description of what this command does. | |
| arg1 | A single word name of the argument. | |
| arg1_description | A user readable description of the argument. |
Definition at line 216 of file CommandRepository.hpp.
References RTT::Error, LocalCommand::getCommandFunction(), and LocalCommand::getConditionFunction().
| bool addCommand | ( | CommandT | com, | |
| const char * | description, | |||
| const char * | arg1, | |||
| const char * | arg1_description, | |||
| const char * | arg2, | |||
| const char * | arg2_description | |||
| ) | [inline] |
Add a Command object, which takes two arguments, to the command interface.
The command is added to the C++ and to the scripting interface.
| c | A pointer to the Command object. | |
| description | A user readable description of what this command does. | |
| arg1 | A single word name of the first argument. | |
| arg1_description | A user readable description of the first argument. | |
| arg2 | A single word name of the second argument. | |
| arg2_description | A user readable description of the second argument. |
Definition at line 256 of file CommandRepository.hpp.
References RTT::Error, LocalCommand::getCommandFunction(), and LocalCommand::getConditionFunction().
| bool addCommand | ( | CommandT | com, | |
| const char * | description, | |||
| const char * | arg1, | |||
| const char * | arg1_description, | |||
| const char * | arg2, | |||
| const char * | arg2_description, | |||
| const char * | arg3, | |||
| const char * | arg3_description | |||
| ) | [inline] |
Add a Command object, which takes three arguments, to the command interface.
The command is added to the C++ and to the scripting interface.
| c | A pointer to the Command object. | |
| description | A user readable description of what this command does. | |
| arg1 | A single word name of the first argument. | |
| arg1_description | A user readable description of the first argument. | |
| arg2 | A single word name of the second argument. | |
| arg2_description | A user readable description of the second argument. | |
| arg3 | A single word name of the third argument. | |
| arg3_description | A user readable description of the third argument. |
Definition at line 301 of file CommandRepository.hpp.
References RTT::Error, LocalCommand::getCommandFunction(), and LocalCommand::getConditionFunction().
| bool addCommand | ( | CommandT | com, | |
| const char * | description, | |||
| const char * | arg1, | |||
| const char * | arg1_description, | |||
| const char * | arg2, | |||
| const char * | arg2_description, | |||
| const char * | arg3, | |||
| const char * | arg3_description, | |||
| const char * | arg4, | |||
| const char * | arg4_description | |||
| ) | [inline] |
Add a Command object, which takes four arguments, to the command interface.
The command is added to the C++ and to the scripting interface.
| c | A pointer to the Command object. | |
| description | A user readable description of what this command does. | |
| arg1 | A single word name of the first argument. | |
| arg1_description | A user readable description of the first argument. | |
| arg2 | A single word name of the second argument. | |
| arg2_description | A user readable description of the second argument. | |
| arg3 | A single word name of the third argument. | |
| arg3_description | A user readable description of the third argument. | |
| arg4 | A single word name of the fourth argument. | |
| arg4_description | A user readable description of the fourth argument. |
Definition at line 349 of file CommandRepository.hpp.
References RTT::Error, LocalCommand::getCommandFunction(), and LocalCommand::getConditionFunction().
| DispatchInterface* getCommand | ( | std::string | name, | |
| const std::vector< DataSourceBase::shared_ptr > & | args | |||
| ) | const [inline] |
For internal use only.
Retrieve a previously added Command.
| name | The name of the Command | |
| args | A vector of command arguments. |
Definition at line 388 of file CommandRepository.hpp.
References OperationFactory::produce().
| bool addCommandDS | ( | DataSource< boost::weak_ptr< CompT > > * | wp, | |
| CommandT | c, | |||
| const char * | description | |||
| ) | [inline] |
For internal use only.
The pointer of the object of which a member function must be invoked is stored in a DataSource such that the pointer can change during program execution. Required in scripting for state machines.
Definition at line 400 of file CommandRepository.hpp.
Referenced by ProgramTask::ProgramTask().
| bool addCommandDS | ( | DataSource< boost::weak_ptr< CompT > > * | wp, | |
| CommandT | c, | |||
| const char * | description, | |||
| const char * | arg1, | |||
| const char * | arg1_description | |||
| ) | [inline] |
For internal use only.
The pointer of the object of which a member function must be invoked is stored in a DataSource such that the pointer can change during program execution. Required in scripting for state machines.
Definition at line 423 of file CommandRepository.hpp.
| ConditionInterface* getCondition | ( | std::string | name, | |
| const std::vector< DataSourceBase::shared_ptr > & | args | |||
| ) | const [inline] |
For internal use Only.
Retrieve the completion condition of a previously added Command.
| name | The name of the Command | |
| args | A vector of command arguments |
Definition at line 449 of file CommandRepository.hpp.
References DispatchInterface::createCondition(), and OperationFactory::produce().
| CommandC create | ( | std::string | name | ) | [inline] |
| int getArity | ( | const std::string & | name | ) | const [inline, inherited] |
Query the number of arguments of an operation.
| name | The name of the operation |
Definition at line 468 of file OperationFactory.hpp.
Referenced by EventService::arity(), MethodC::D::checkAndCreate(), CommandC::D::checkAndCreate(), MethodC::execute(), and CommandC::execute().
| ResultT produce | ( | const std::string & | name, | |
| const PropertyBag & | args | |||
| ) | const [inline, inherited] |
Produce an object that contains an operation.
| name | The name of the operation | |
| args | The arguments filled in as properties. |
Definition at line 482 of file OperationFactory.hpp.
Referenced by MethodC::D::checkAndCreate(), CommandC::D::checkAndCreate(), CommandRepository::getCommand(), CommandRepository::getCondition(), EventService::getEvent(), and MethodRepository::getMethod().
| ResultT produce | ( | const std::string & | name, | |
| const std::vector< DataSourceBase::shared_ptr > & | args | |||
| ) | const [inline, inherited] |
Produce an object that contains an operation.
| name | The name of the operation | |
| args | The arguments filled in as data sources. |
Definition at line 501 of file OperationFactory.hpp.
| Descriptions getArgumentList | ( | const std::string & | name | ) | const [inline, inherited] |
Get the names and descriptions of all arguments of an operation.
| name | The name of the operation |
Definition at line 516 of file OperationFactory.hpp.
| std::string getResultType | ( | const std::string & | name | ) | const [inline, inherited] |
Get the type name of the result type of an operation.
| name | The name of the operation |
Definition at line 530 of file OperationFactory.hpp.
| std::string getDescription | ( | const std::string & | name | ) | const [inline, inherited] |
Get the description of an operation.
| name | The name of the operation |
Definition at line 544 of file OperationFactory.hpp.
| void add | ( | const std::string & | name, | |
| detail::OperationFactoryPart< ResultT > * | part | |||
| ) | [inline, inherited] |
Add a new operation to the interface.
| name | The name of the operation | |
| part | A part which creates the operation. |
Definition at line 557 of file OperationFactory.hpp.
Referenced by ControlTaskProxy::fetchObjects(), and ControlTaskProxy::synchronize().
| void remove | ( | const std::string & | name | ) | [inline, inherited] |
Remove an added operation from the interface.
| name | The name of the operation |
Definition at line 572 of file OperationFactory.hpp.
1.5.3