This singleton class keep tracks of all features and tasks. More...
#include <sot/core/pool.hh>
Public Types | |
Define types to simplify the writing | |
typedef std::map< std::string, TaskAbstract * > | Tasks |
Sorted set of tasks with unique key (name). | |
typedef std::map< std::string, FeatureAbstract * > | Features |
Sorted set of features with unique key (name). | |
Public Member Functions | |
~PoolStorage (void) | |
Default destructor. | |
void | commandLine (const std::string &objectName, const std::string &functionName, std::istringstream &cmdArg, std::ostream &os) |
This method looks for the object named objectName, and ask to provide the function functionName with the arguments cmdArg. If the method of the object displays some information this will be done on os. | |
void | writeGraph (const std::string &aFileName) |
This method write a graph description on the file named FileName. | |
void | writeCompletionList (std::ostream &os) |
Methods related to the handling of the features | |
void | registerFeature (const std::string &entname, FeatureAbstract *ent) |
Registering a feature. | |
FeatureAbstract & | getFeature (const std::string &name) |
Get a reference to a feature. | |
Methods related to the handling of the tasks | |
void | registerTask (const std::string &entname, TaskAbstract *ent) |
Registering a task. | |
TaskAbstract & | getTask (const std::string &name) |
Get a reference to a task. | |
Static Public Member Functions | |
static PoolStorage * | getInstance () |
Get unique instance of the class. | |
static void | destroy () |
destroy unique instance of the class | |
Protected Attributes | |
Fields of the class to manage the three entities. | |
Also the name is singular, those are true sets. | |
Tasks | task |
Set of controllers. | |
Features | feature |
Set of features. |
This singleton class keep tracks of all features and tasks.
Three kinds of objects are handled:
This class provides the necessary operations to register, unregister each instance of thoses classes. As tasks and features derived from Entities, they should be registered as such.
The role of this class is also to look for the object supporting a command, and to apply this command.
It also returns references to signals from their fully-qualified names.
typedef std::map< std::string,FeatureAbstract* > dynamicgraph::sot::PoolStorage::Features |
Sorted set of features with unique key (name).
typedef std::map< std::string,TaskAbstract* > dynamicgraph::sot::PoolStorage::Tasks |
Sorted set of tasks with unique key (name).
Default destructor.
void dynamicgraph::sot::PoolStorage::commandLine | ( | const std::string & | objectName, |
const std::string & | functionName, | ||
std::istringstream & | cmdArg, | ||
std::ostream & | os | ||
) |
This method looks for the object named objectName, and ask to provide the function functionName with the arguments cmdArg. If the method of the object displays some information this will be done on os.
The commands specific to the pool< > object are:
static void dynamicgraph::sot::PoolStorage::destroy | ( | ) | [static] |
destroy unique instance of the class
FeatureAbstract& dynamicgraph::sot::PoolStorage::getFeature | ( | const std::string & | name | ) |
Get a reference to a feature.
static PoolStorage* dynamicgraph::sot::PoolStorage::getInstance | ( | ) | [static] |
Get unique instance of the class.
TaskAbstract& dynamicgraph::sot::PoolStorage::getTask | ( | const std::string & | name | ) |
Get a reference to a task.
void dynamicgraph::sot::PoolStorage::registerFeature | ( | const std::string & | entname, |
FeatureAbstract * | ent | ||
) |
Registering a feature.
void dynamicgraph::sot::PoolStorage::registerTask | ( | const std::string & | entname, |
TaskAbstract * | ent | ||
) |
Registering a task.
void dynamicgraph::sot::PoolStorage::writeCompletionList | ( | std::ostream & | os | ) |
void dynamicgraph::sot::PoolStorage::writeGraph | ( | const std::string & | aFileName | ) |
This method write a graph description on the file named FileName.
Features dynamicgraph::sot::PoolStorage::feature [protected] |
Set of features.
Tasks dynamicgraph::sot::PoolStorage::task [protected] |
Set of controllers.