Singleton that keeps track of all the entities. More...
#include <pool.h>
Public Member Functions | |
SignalBase< int > & | getSignal (std::istringstream &sigpath) |
Get a signal by name. More... | |
void | writeCompletionList (std::ostream &os) |
void | writeGraph (const std::string &aFileName) |
This method write a graph description on the file named FileName. More... | |
~PoolStorage () | |
Default destructor. More... | |
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... | |
static PoolStorage * | instance_ = 0 |
PoolStorage () | |
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.
Definition at line 33 of file include/dynamic-graph/pool.h.
typedef std::map<std::string, Entity *> dynamicgraph::PoolStorage::Entities |
Sorted set of entities with unique key (name).
Definition at line 39 of file include/dynamic-graph/pool.h.
PoolStorage::~PoolStorage | ( | ) |
Default destructor.
Definition at line 43 of file src/dgraph/pool.cpp.
|
inlineprivate |
Definition at line 110 of file include/dynamic-graph/pool.h.
void PoolStorage::clearPlugin | ( | const std::string & | name | ) |
Disallocate an entity.
Definition at line 122 of file src/dgraph/pool.cpp.
void PoolStorage::deregisterEntity | ( | const std::string & | entname | ) |
Unregister an entity.
Definition at line 75 of file src/dgraph/pool.cpp.
void PoolStorage::deregisterEntity | ( | const Entities::iterator & | entity | ) |
Unregister an entity.
Definition at line 89 of file src/dgraph/pool.cpp.
|
static |
Destroy the unique instance of the class.
Definition at line 38 of file src/dgraph/pool.cpp.
bool PoolStorage::existEntity | ( | const std::string & | name | ) |
Test if the entity exists.
Definition at line 108 of file src/dgraph/pool.cpp.
bool PoolStorage::existEntity | ( | const std::string & | name, |
Entity *& | ptr | ||
) |
Test if the entity exists. If it does, return a pointer on it.
Definition at line 112 of file src/dgraph/pool.cpp.
Entity & PoolStorage::getEntity | ( | const std::string & | name | ) |
Get an entity.
Definition at line 93 of file src/dgraph/pool.cpp.
const PoolStorage::Entities & PoolStorage::getEntityMap | ( | ) | const |
Const access to entity map.
Definition at line 104 of file src/dgraph/pool.cpp.
|
static |
Get unique instance of the class.
Definition at line 31 of file src/dgraph/pool.cpp.
SignalBase< int > & PoolStorage::getSignal | ( | std::istringstream & | sigpath | ) |
Get a signal by name.
sigpath | stream containing a string of the form "entity.signal" |
Definition at line 222 of file src/dgraph/pool.cpp.
void PoolStorage::registerEntity | ( | const std::string & | entname, |
Entity * | ent | ||
) |
Register an entity.
Definition at line 60 of file src/dgraph/pool.cpp.
void PoolStorage::writeCompletionList | ( | std::ostream & | os | ) |
Definition at line 198 of file src/dgraph/pool.cpp.
void PoolStorage::writeGraph | ( | const std::string & | aFileName | ) |
This method write a graph description on the file named FileName.
Definition at line 145 of file src/dgraph/pool.cpp.
|
protected |
Set of basic objects of the SoT.
Definition at line 107 of file include/dynamic-graph/pool.h.
|
staticprivate |
Definition at line 111 of file include/dynamic-graph/pool.h.