#ifndef SECTIONTOEXECUTE_SEEN #define SECTIONTOEXECUTE_SEEN #include "nomDeLogiciel.h" #include "abstractElement.h" #include "abstractSoftware.h" #include "sector.h" class sectionToExecute { public : /** Create a new sectionToExecute and initialize it with the given element and software */ sectionToExecute(abstractElement*,abstractSoftware*,dataManager*,sector*); /** Deprecated : To be removed ! */ sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*); ~sectionToExecute() {;} inline abstractSoftware* getSoftware() const { return software_; } inline void setSoftware(abstractSoftware* soft) { software_ = soft; } /** Set a software according to the corresponding given string. If not found, set a softwareUnknown */ void setSoftware(std::string); /** Get the vector of elements of this sector */ inline std::vector< abstractElement* > getElements() {return elements_;}; inline sector* getSector() const {return sector_;}; /** Get the last element of this section */ inline abstractElement* getLastElement() {return elements_.back();}; /** Remove the last element of this section */ inline void removeLastElement() {return elements_.pop_back();}; bool insertAfter(abstractElement*,abstractElement*); inline void insertAtFirst(abstractElement* abs) { elements_.insert ( elements_.begin() ,abs); }; inline void removeFirstElement() { elements_.erase(elements_.begin()); }; inline void insertAtLast(abstractElement* abs) { elements_.push_back(abs); }; /** Set the first element of this section. If needed, it will change the last element of the previous section */ void setFirstElement(int); bool isInside(abstractElement*); void removeElement(abstractElement*); private : abstractSoftware* software_; dataManager* dataManager_; std::vector< abstractElement* > elements_; sector* sector_; }; #endif