]> Creatis software - creaEnvironment.git/blob - lib/kernel_Environment/EnvironmentHandler.h
License Files Headers
[creaEnvironment.git] / lib / kernel_Environment / EnvironmentHandler.h
1 /*
2  # ---------------------------------------------------------------------
3  #
4  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5  #                        pour la SantÈ)
6  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9  #
10  #  This software is governed by the CeCILL-B license under French law and
11  #  abiding by the rules of distribution of free software. You can  use,
12  #  modify and/ or redistribute the software under the terms of the CeCILL-B
13  #  license as circulated by CEA, CNRS and INRIA at the following URL
14  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15  #  or in the file LICENSE.txt.
16  #
17  #  As a counterpart to the access to the source code and  rights to copy,
18  #  modify and redistribute granted by the license, users are provided only
19  #  with a limited warranty  and the software's author,  the holder of the
20  #  economic rights,  and the successive licensors  have only  limited
21  #  liability.
22  #
23  #  The fact that you are presently reading this means that you have had
24  #  knowledge of the CeCILL-B license and that you accept its terms.
25  # ------------------------------------------------------------------------ */
26
27
28
29 // SYSTEM INCLUDES
30 #include <iostream>
31 #include <map>
32 #include <vector>
33 #include <string>
34
35 // PROJECT INCLUDES
36
37 #include "EnvironmentEnvironmentHandler"
38
39 // LOCAL INCLUDES
40
41 // FORWARD REFERENCES
42
43 /*
44 *       COMMENT
45 *       @param
46 *       @return
47 */
48 #ifndef __EnvironmentHandler_h__INCLUDED
49 template <class P>
50
51 class EnvironmentHandler
52         {
53                                 public:
54                                                 //====== LIFECYCLE ========
55                                                 EnvironmentHandler(SomeEnvironment<P>* environment);
56                                                 ~EnvironmentHandler();
57                                                                                                         
58                                                 //====== OPERATIONS =======
59                                                 /*
60                                                 * change the actual intants associated to the
61                                                 * names given
62                                                 */
63                                                 void nextInstants(std::vector<std::string> nameConcepts);
64                                                 
65                                                 /*
66                                                 * adds an actual        Instant to a concept, it means, this instant
67                                                 * has all index fixed, except the index in the instant of the concept
68                                                 * identified by nameConcept
69                                                 */
70                                                 void addActualInstantOfCOncept(std::string nameConcept,Instant* instant);
71                                                 
72                                                 /*
73                                                 * removes the  pair in the map of actual concepts
74                                                 */
75                                                 void removeActualInstantOfConcept(std::string nameConcept);
76                                                 
77                                                 //====== INQUIRY =========
78                                                 /*
79                                                 * get all the actual instants
80                                                 */
81                                                 void getActualsInstants(std::vector<Instant*>& instantsVector);
82                                                 
83                                                 /*
84                                                 * get the actual instant fot the concept identified by the name
85                                                 */
86                                                 Instant* getActualInstant(std::string nameConcept);
87                                                 //====== ACCESS ==========
88                                         
89                                                 
90
91                                                 
92                                 private:
93                                         
94                                         //======= ATTRIBUTES=======
95                                         
96                                         /*
97                                         *       actual instants of the environmenHandler
98                                         */
99                                         
100                                         std::map<std::string,Instant*>          actualInstants;
101                                         /*
102                                         *       Environment that's being handled
103                                         */
104                                 
105                                         SomeEnvironment<P>* environment;
106                                         //====== PRIVATE METHODS=========
107                                 
108                                                         
109         };
110 //include the implementation of the template
111 #include "EnvironmentHandler_Txx.h"
112 #endif