2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
47 #ifndef __INSTANT_H_INCLUDED__
48 #define __INSTANT_H_INCLUDED__
50 #include "ConceptInstantHandler.h"
52 class creaEnvironment_EXPORTS Instant
57 //====== LIFECYCLE ========
58 Instant(std::vector<int>* instant);
63 //====== OPERATIONS =======
65 * Add a new concept to the instant
66 * @param indexConcept: index concept that is going
67 * to be added of the new concept added to the instant
71 void addConcept(int value);
72 //======= INQUIRY ===========
74 * Returns the value nTuple
77 std::vector<int>* getInstant();
79 * Returns the index of the concept that's
80 * in the instant's concept index
81 * @param indexConcept: index of the concept in the instant
82 * @return indexInConcept
84 int getIndexInConcept(int indexConcept);
87 * returns the number of concepts that the instant has
88 * @return nTuple.size()
94 * Compares if the instant given is equals to the nTuple
95 * @param instant: instant for compare
96 * @return true if is equals to the nTuple, false otherwise
98 bool isEquals(Instant* instant);
101 //=========== ACCESS ==========
104 * @param instant: the vector that's going to be save in
107 void setInstant(std::vector<int>* instant);
110 * Change the concept's index saved in the nTuple index (the index
111 * that's is for that concept
112 * @param indexConcept: Concept that's going to change the value
116 void setConcept(int indexConcept, int index);
118 * remove a concept from the instant
119 * @param indexConcept: Concept that's going to be removec
120 * @return true if succesful, false otherwise
123 bool removeConcept(int indexConcept);
127 //=========== ATTRIBUTES==========
129 * The vector that's represent an instant according to the
130 * number of concepts that are already defined
132 * concepts: (time,patient), and time's size is 2, patients's size is 2
133 * then an possible instant is (1,2)
136 std::vector<int>* nTuple;