This singleton class keep tracks of all features and tasks. More...
#include <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). More... | |
typedef std::map< std::string, FeatureAbstract * > | Features |
Sorted set of features with unique key (name). More... | |
Public Member Functions | |
void | writeCompletionList (std::ostream &os) |
void | writeGraph (const std::string &aFileName) |
This method write a graph description on the file named FileName. More... | |
~PoolStorage (void) | |
Default destructor. More... | |
Methods related to the handling of the features | |
void | registerFeature (const std::string &entname, FeatureAbstract *ent) |
Registering a feature. More... | |
FeatureAbstract & | getFeature (const std::string &name) |
Get a reference to a feature. More... | |
Methods related to the handling of the tasks | |
void | registerTask (const std::string &entname, TaskAbstract *ent) |
Registering a task. More... | |
TaskAbstract & | getTask (const std::string &name) |
Get a reference to a task. More... | |
Static Public Member Functions | |
static void | destroy () |
destroy unique instance of the class More... | |
static PoolStorage * | getInstance () |
Get unique instance of the class. More... | |
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. More... | |
Features | feature |
Set of features. More... | |
Private Member Functions | |
PoolStorage () | |
Static Private Attributes | |
static PoolStorage * | instance_ |
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 |
typedef std::map<std::string, TaskAbstract *> dynamicgraph::sot::PoolStorage::Tasks |
dynamicgraph::sot::PoolStorage::~PoolStorage | ( | void | ) |
Default destructor.
|
private |
|
static |
destroy unique instance of the class
FeatureAbstract & dynamicgraph::sot::PoolStorage::getFeature | ( | const std::string & | name | ) |
|
static |
Get unique instance of the class.
TaskAbstract & dynamicgraph::sot::PoolStorage::getTask | ( | const std::string & | name | ) |
void dynamicgraph::sot::PoolStorage::registerFeature | ( | const std::string & | entname, |
FeatureAbstract * | ent | ||
) |
void dynamicgraph::sot::PoolStorage::registerTask | ( | const std::string & | entname, |
TaskAbstract * | ent | ||
) |
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.
|
protected |
|
staticprivate |
|
protected |