// MACRO #ifndef __SOMETHING_H_INCLUDED__ #define __SOMETHING_H_INCLUDED__ // SYSTEM INCLUDES // PROJECT INCLUDES #include #include // LOCAL INCLUDES #include "Instant.h" // FORWARD REFERENCES /* * COMMENT * @param * @return */ template class SomeThing { public: //====== LIFECYCLE ======== SomeThing(std::string name); ~SomeThing(); //====== OPERATIONS ======= /* * Add a new instant to the thing * @param instant: new instant */ bool addInstant(Instant* instant); //====== INQUIRY ========= /* * Get the thing stored * @return thing */ U* getThing(); /* * Get the name of the thing * @return nameThing */ std::string getName(); /* * Get all the instants * @return instants */ std::vector* getInstants(); /* * Get the instant that's in the index given * @param indexInstant: index of the instant that they want * @return instants[instantIndex] */ Instant* getInstant(int indexInstant); /* * Get the number of instants that the * thng has. * @return instants.size() */ int getNumberInstants(); /* * if this is in the instant given * @param instant: instant to verified if this has it * @return 0<=i instants); /* * Remove an instant from the thing * @param indexInstant: index of the instant to be removed * @return true if succesful , false otherwise */ bool removeInstant(int indexInstant); /* * Remove an instant from the thing * @param instant: instant to be deleted * @return true if succesful , false otherwise */ bool removeInstant(Instant* instant); private: //======= ATTRIBUTES======= /* * name of the something * WARNING * has to be different from the * other existing somethings in the program * using the handler */ std::string nameThing; /* * the thing that we are handling * it could be any object */ U thing; /* * instants that the thing * has defined */ std::vector instantsVector; }; //include the implementation of the template #include "SomeThing_Txx.h" #endif