21 #ifndef __INSTANT_H_INCLUDED__
22 #define __INSTANT_H_INCLUDED__
24 #include "ConceptInstantHandler.h"
26 class creaEnvironment_EXPORTS Instant
31 //====== LIFECYCLE ========
32 Instant(std::vector<int>* instant);
37 //====== OPERATIONS =======
39 * Add a new concept to the instant
40 * @param indexConcept: index concept that is going
41 * to be added of the new concept added to the instant
45 void addConcept(int value);
46 //======= INQUIRY ===========
48 * Returns the value nTuple
51 std::vector<int>* getInstant();
53 * Returns the index of the concept that's
54 * in the instant's concept index
55 * @param indexConcept: index of the concept in the instant
56 * @return indexInConcept
58 int getIndexInConcept(int indexConcept);
61 * returns the number of concepts that the instant has
62 * @return nTuple.size()
68 * Compares if the instant given is equals to the nTuple
69 * @param instant: instant for compare
70 * @return true if is equals to the nTuple, false otherwise
72 bool isEquals(Instant* instant);
75 //=========== ACCESS ==========
78 * @param instant: the vector that's going to be save in
81 void setInstant(std::vector<int>* instant);
84 * Change the concept's index saved in the nTuple index (the index
85 * that's is for that concept
86 * @param indexConcept: Concept that's going to change the value
90 void setConcept(int indexConcept, int index);
92 * remove a concept from the instant
93 * @param indexConcept: Concept that's going to be removec
94 * @return true if succesful, false otherwise
97 bool removeConcept(int indexConcept);
101 //=========== ATTRIBUTES==========
103 * The vector that's represent an instant according to the
104 * number of concepts that are already defined
106 * concepts: (time,patient), and time's size is 2, patients's size is 2
107 * then an possible instant is (1,2)
110 std::vector<int>* nTuple;