pool.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_POOL_HH__
11 #define __SOT_POOL_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* --- STD --- */
18 #include <map>
19 #include <sstream>
20 #include <string>
21 
22 /* --- SOT --- */
23 #include <dynamic-graph/pool.h>
25 
27 
28 #include "sot/core/api.hh"
29 
30 /* --------------------------------------------------------------------- */
31 /* --- CLASS ----------------------------------------------------------- */
32 /* --------------------------------------------------------------------- */
33 
34 namespace dynamicgraph {
35 namespace sot {
36 
37 // Preliminary declarations
38 class FeatureAbstract;
39 class TaskAbstract;
40 
64  public:
69  typedef std::map<std::string, TaskAbstract *> Tasks;
70 
72  typedef std::map<std::string, FeatureAbstract *> Features;
75  protected:
82  Tasks task;
83 
85  Features feature;
88  public:
90  ~PoolStorage(void);
91 
93  static PoolStorage *getInstance();
94 
96  static void destroy();
97 
102  void registerFeature(const std::string &entname, FeatureAbstract *ent);
103 
105  FeatureAbstract &getFeature(const std::string &name);
112  void registerTask(const std::string &entname, TaskAbstract *ent);
114  TaskAbstract &getTask(const std::string &name);
119  void writeGraph(const std::string &aFileName);
120  void writeCompletionList(std::ostream &os);
121 
122  private:
123  PoolStorage();
125 };
126 
127 } /* namespace sot */
128 } /* namespace dynamicgraph */
129 
130 #endif /* #ifndef __SOT_POOL_HH__ */
static PoolStorage * instance_
Definition: pool.hh:124
std::map< std::string, TaskAbstract * > Tasks
Sorted set of tasks with unique key (name).
Definition: pool.hh:69
#define SOT_CORE_EXPORT
Definition: api.hh:20
Tasks task
Set of controllers.
Definition: pool.hh:82
Features feature
Set of features.
Definition: pool.hh:85
std::map< std::string, FeatureAbstract * > Features
Sorted set of features with unique key (name).
Definition: pool.hh:72
This class gives the abstract definition of a feature.
void writeGraph(const char *filename)


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26