[443] | 1 | #ifndef SECTOR_SEEN |
---|
| 2 | #define SECTOR_SEEN |
---|
| 3 | |
---|
| 4 | #include <vector> |
---|
[455] | 5 | #include <string> |
---|
[443] | 6 | |
---|
[455] | 7 | #include "nomDeLogiciel.h" |
---|
| 8 | #include "sectorParameters.h" |
---|
| 9 | |
---|
| 10 | class sectionToExecute; |
---|
| 11 | class abstractElement; |
---|
| 12 | class dataManager; |
---|
| 13 | |
---|
[443] | 14 | class sector |
---|
| 15 | { |
---|
| 16 | public : |
---|
| 17 | |
---|
[455] | 18 | sector(dataManager*, std::string name = "sector default name"); |
---|
[443] | 19 | virtual ~sector(); |
---|
| 20 | /** |
---|
| 21 | Set if this sector is reflected |
---|
| 22 | */ |
---|
| 23 | inline void setReflected(bool r) { reflected_ = r;}; |
---|
| 24 | /** |
---|
| 25 | Get if this sector is reflected |
---|
| 26 | */ |
---|
| 27 | inline bool getReflected() { return reflected_;}; |
---|
| 28 | |
---|
| 29 | /** |
---|
[449] | 30 | Set the original sector from where this sector is reflected/duplicated |
---|
[443] | 31 | */ |
---|
[449] | 32 | inline void setDuplicatedFrom(sector* s) { duplicatedFrom_ = s;}; |
---|
[443] | 33 | /** |
---|
[449] | 34 | Get the original sector from where this sector is reflected/duplicated. Return NULL if not |
---|
[443] | 35 | */ |
---|
[449] | 36 | inline sector* getDuplicatedFrom() { return duplicatedFrom_;}; |
---|
[443] | 37 | |
---|
| 38 | |
---|
| 39 | /** |
---|
| 40 | Set the repetition number |
---|
| 41 | */ |
---|
| 42 | inline void setRepetitionNumber(unsigned int n) { repetitionNumber_ = n;}; |
---|
| 43 | /** |
---|
| 44 | Get the repetition number |
---|
| 45 | */ |
---|
| 46 | inline unsigned int getRepetitionNumber() { return repetitionNumber_;}; |
---|
| 47 | |
---|
| 48 | /** |
---|
| 49 | Set the name |
---|
| 50 | */ |
---|
| 51 | inline void setName(std::string name) { name_ = name;}; |
---|
| 52 | /** |
---|
| 53 | Get the name |
---|
| 54 | */ |
---|
| 55 | inline std::string getName() { return name_;}; |
---|
| 56 | |
---|
| 57 | /** |
---|
| 58 | Return the vector of sectionToExecute of this |
---|
| 59 | */ |
---|
| 60 | inline std::vector <sectionToExecute*> getSectionsToExecute() { return sectionToExecute_;}; |
---|
| 61 | |
---|
| 62 | /** |
---|
| 63 | Add a sectionToExecute |
---|
| 64 | */ |
---|
| 65 | inline void addSectionToExecute(sectionToExecute* s) { |
---|
| 66 | if (s) sectionToExecute_.push_back(s); |
---|
| 67 | }; |
---|
| 68 | |
---|
[455] | 69 | /** Add an element after another one. Will put it in the same sectionToExecuteList. If the element after is NULL |
---|
| 70 | it will create a new sectionToExecute and put it inside. |
---|
| 71 | */ |
---|
| 72 | void addElementAfter(abstractElement*,abstractElement*); |
---|
| 73 | |
---|
| 74 | /** |
---|
| 75 | set the specific software for the given sectionToExecute number |
---|
| 76 | */ |
---|
| 77 | bool setSoftware(nomDeLogiciel, unsigned int sectionToExecuteNumber); |
---|
| 78 | |
---|
| 79 | void clearSectionToExecute(); |
---|
| 80 | /** Clear a specific jobList */ |
---|
| 81 | void clearSectionToExecute(int a); |
---|
| 82 | |
---|
| 83 | inline sectorParameters getSectorParameters() { |
---|
| 84 | return sectorParam_; |
---|
| 85 | } |
---|
| 86 | |
---|
[443] | 87 | private: |
---|
[455] | 88 | |
---|
[443] | 89 | std::vector <sectionToExecute*> sectionToExecute_; |
---|
| 90 | |
---|
| 91 | std::string name_; |
---|
| 92 | bool reflected_; |
---|
[449] | 93 | sector* duplicatedFrom_; |
---|
[443] | 94 | unsigned int repetitionNumber_; |
---|
[455] | 95 | dataManager* dataManager_; |
---|
| 96 | sectorParameters sectorParam_; //xx |
---|
[443] | 97 | }; |
---|
| 98 | #endif |
---|