include/dynamic-graph/pool.h
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 // Copyright 2010, François Bleibel, Thomas Moulard, Olivier Stasse,
3 // JRL, CNRS/AIST.
4 //
5 
6 #ifndef DYNAMIC_GRAPH_POOL_H
7 #define DYNAMIC_GRAPH_POOL_H
11 
12 #include <dynamic-graph/fwd.hh>
13 #include <map>
14 #include <sstream>
15 #include <string>
16 
17 namespace dynamicgraph {
33 class DYNAMIC_GRAPH_DLLAPI PoolStorage {
34  public:
39  typedef std::map<std::string, Entity *> Entities;
40 
42  static PoolStorage *getInstance();
43 
45  static void destroy();
46 
50  ~PoolStorage();
51 
59  void registerEntity(const std::string &entname, Entity *ent);
60 
64  void deregisterEntity(const std::string &entname);
65 
69  void deregisterEntity(const Entities::iterator &entity);
74  Entity &getEntity(const std::string &name);
75 
77  const Entities &getEntityMap() const;
78 
80  bool existEntity(const std::string &name);
82  bool existEntity(const std::string &name, Entity *&ptr);
83 
87  void clearPlugin(const std::string &name);
90  SignalBase<int> &getSignal(std::istringstream &sigpath);
95 
98  void writeGraph(const std::string &aFileName);
99  void writeCompletionList(std::ostream &os);
100 
101  protected:
107  Entities entityMap;
108 
109  private:
112 };
113 
115 
116 } // end of namespace dynamicgraph.
117 
118 #endif
Singleton that keeps track of all the entities.
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
static PoolStorage * getInstance()
Get unique instance of the class.
std::map< std::string, Entity * > Entities
Sorted set of entities with unique key (name).
Entities entityMap
Set of basic objects of the SoT.


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03