Singleton that keeps track of all the entities. More...
#include <dynamic-graph/pool.h>
Public Member Functions | |
~PoolStorage () | |
Default destructor. More... | |
SignalBase< int > & | getSignal (std::istringstream &sigpath) |
Get a signal by name. More... | |
void | writeGraph (const std::string &aFileName) |
This method write a graph description on the file named FileName. More... | |
void | writeCompletionList (std::ostream &os) |
Method related to the handling of entities. | |
void | registerEntity (const std::string &entname, Entity *ent) |
Register an entity. More... | |
void | deregisterEntity (const std::string &entname) |
Unregister an entity. More... | |
void | deregisterEntity (const Entities::iterator &entity) |
Unregister an entity. More... | |
Entity & | getEntity (const std::string &name) |
Get an entity. More... | |
const Entities & | getEntityMap () const |
Const access to entity map. More... | |
bool | existEntity (const std::string &name) |
Test if the entity exists. More... | |
bool | existEntity (const std::string &name, Entity *&ptr) |
Test if the entity exists. If it does, return a pointer on it. More... | |
void | clearPlugin (const std::string &name) |
Disallocate an entity. More... | |
Define types to simplify the writing | |
typedef std::map< std::string, Entity * > | Entities |
Sorted set of entities with unique key (name). More... | |
static PoolStorage * | getInstance () |
Get unique instance of the class. More... | |
static void | destroy () |
Destroy the unique instance of the class. More... | |
Fields of the class to manage the three entities. | |
Entities | entityMap |
Set of basic objects of the SoT. More... | |
Singleton that keeps track of all the entities.
This class gives access to and remembers all the entities created during its life.
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.
typedef std::map<std::string, Entity *> dynamicgraph::PoolStorage::Entities |
Sorted set of entities with unique key (name).
dynamicgraph::PoolStorage::~PoolStorage | ( | ) |
Default destructor.
void dynamicgraph::PoolStorage::clearPlugin | ( | const std::string & | name | ) |
Disallocate an entity.
void dynamicgraph::PoolStorage::deregisterEntity | ( | const std::string & | entname | ) |
Unregister an entity.
void dynamicgraph::PoolStorage::deregisterEntity | ( | const Entities::iterator & | entity | ) |
Unregister an entity.
|
static |
Destroy the unique instance of the class.
bool dynamicgraph::PoolStorage::existEntity | ( | const std::string & | name | ) |
Test if the entity exists.
bool dynamicgraph::PoolStorage::existEntity | ( | const std::string & | name, |
Entity *& | ptr | ||
) |
Test if the entity exists. If it does, return a pointer on it.
Entity& dynamicgraph::PoolStorage::getEntity | ( | const std::string & | name | ) |
Get an entity.
const Entities& dynamicgraph::PoolStorage::getEntityMap | ( | ) | const |
Const access to entity map.
|
static |
Get unique instance of the class.
Referenced by dynamicgraph::g_pool().
SignalBase<int>& dynamicgraph::PoolStorage::getSignal | ( | std::istringstream & | sigpath | ) |
Get a signal by name.
sigpath | stream containing a string of the form "entity.signal" |
void dynamicgraph::PoolStorage::registerEntity | ( | const std::string & | entname, |
Entity * | ent | ||
) |
Register an entity.
void dynamicgraph::PoolStorage::writeCompletionList | ( | std::ostream & | os | ) |
void dynamicgraph::PoolStorage::writeGraph | ( | const std::string & | aFileName | ) |
This method write a graph description on the file named FileName.
|
protected |
Set of basic objects of the SoT.