]> Creatis software - creaEnvironment.git/blob - lib/kernel_Environment/EnvironmentHandler.h
624e2a4845f6401a2547f78e18bd5ae78ad4dc48
[creaEnvironment.git] / lib / kernel_Environment / EnvironmentHandler.h
1
2
3 // SYSTEM INCLUDES
4 #include <iostream>
5 #include <map>
6 #include <vector>
7 #include <string>
8
9 // PROJECT INCLUDES
10
11 #include "EnvironmentEnvironmentHandler"
12
13 // LOCAL INCLUDES
14
15 // FORWARD REFERENCES
16
17 /*
18 *       COMMENT
19 *       @param
20 *       @return
21 */
22 #ifndef __EnvironmentHandler_h__INCLUDED
23 template <class P>
24
25 class EnvironmentHandler
26         {
27                                 public:
28                                                 //====== LIFECYCLE ========
29                                                 EnvironmentHandler(SomeEnvironment<P>* environment);
30                                                 ~EnvironmentHandler();
31                                                                                                         
32                                                 //====== OPERATIONS =======
33                                                 /*
34                                                 * change the actual intants associated to the
35                                                 * names given
36                                                 */
37                                                 void nextInstants(std::vector<std::string> nameConcepts);
38                                                 
39                                                 /*
40                                                 * adds an actual        Instant to a concept, it means, this instant
41                                                 * has all index fixed, except the index in the instant of the concept
42                                                 * identified by nameConcept
43                                                 */
44                                                 void addActualInstantOfCOncept(std::string nameConcept,Instant* instant);
45                                                 
46                                                 /*
47                                                 * removes the  pair in the map of actual concepts
48                                                 */
49                                                 void removeActualInstantOfConcept(std::string nameConcept);
50                                                 
51                                                 //====== INQUIRY =========
52                                                 /*
53                                                 * get all the actual instants
54                                                 */
55                                                 void getActualsInstants(std::vector<Instant*>& instantsVector);
56                                                 
57                                                 /*
58                                                 * get the actual instant fot the concept identified by the name
59                                                 */
60                                                 Instant* getActualInstant(std::string nameConcept);
61                                                 //====== ACCESS ==========
62                                         
63                                                 
64
65                                                 
66                                 private:
67                                         
68                                         //======= ATTRIBUTES=======
69                                         
70                                         /*
71                                         *       actual instants of the environmenHandler
72                                         */
73                                         
74                                         std::map<std::string,Instant*>          actualInstants;
75                                         /*
76                                         *       Environment that's being handled
77                                         */
78                                 
79                                         SomeEnvironment<P>* environment;
80                                         //====== PRIVATE METHODS=========
81                                 
82                                                         
83         };
84 //include the implementation of the template
85 #include "EnvironmentHandler_Txx.h"
86 #endif