[58] | 1 | #ifndef SECTIONTOEXECUTE_SEEN |
---|
| 2 | #define SECTIONTOEXECUTE_SEEN |
---|
| 3 | |
---|
| 4 | #include "nomDeLogiciel.h" |
---|
[401] | 5 | #include "abstractElement.h" |
---|
| 6 | #include "abstractSoftware.h" |
---|
[58] | 7 | |
---|
[401] | 8 | class sectionToExecute |
---|
[58] | 9 | { |
---|
[431] | 10 | public : |
---|
[58] | 11 | |
---|
[455] | 12 | /** Create a new sectionToExecute and initialize it with the given element and software |
---|
| 13 | */ |
---|
| 14 | sectionToExecute(abstractElement*,abstractSoftware*); |
---|
[431] | 15 | |
---|
| 16 | /** Deprecated : To be removed ! */ |
---|
| 17 | sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*); |
---|
[413] | 18 | |
---|
[431] | 19 | ~sectionToExecute() {;} |
---|
[401] | 20 | |
---|
[431] | 21 | inline abstractSoftware* getSoftware() const { |
---|
[455] | 22 | return software_; |
---|
[431] | 23 | } |
---|
| 24 | |
---|
[469] | 25 | inline void setSoftware(abstractSoftware* soft) { |
---|
[455] | 26 | software_ = soft; |
---|
| 27 | } |
---|
| 28 | |
---|
[469] | 29 | /** |
---|
| 30 | Set a software according to the corresponding given string. |
---|
| 31 | If not found, set a softwareUnknown |
---|
| 32 | */ |
---|
| 33 | void setSoftware(std::string); |
---|
| 34 | |
---|
[455] | 35 | /** |
---|
| 36 | Get the vector of elements of this sector |
---|
| 37 | */ |
---|
| 38 | inline std::vector< abstractElement* > getElements() {return elements_;}; |
---|
| 39 | |
---|
[468] | 40 | /** |
---|
| 41 | Get the last element of this section |
---|
| 42 | */ |
---|
| 43 | inline abstractElement* getLastElement() {return elements_.back();}; |
---|
| 44 | |
---|
| 45 | /** |
---|
| 46 | Remove the last element of this section |
---|
| 47 | */ |
---|
| 48 | inline void removeLastElement() {return elements_.pop_back();}; |
---|
| 49 | |
---|
[455] | 50 | bool insertAfter(abstractElement*,abstractElement*); |
---|
[431] | 51 | |
---|
[469] | 52 | inline bool insertAtFirst(abstractElement* abs) { |
---|
| 53 | elements_.insert ( elements_.begin() ,abs); |
---|
| 54 | }; |
---|
| 55 | |
---|
[455] | 56 | private : |
---|
[431] | 57 | |
---|
[455] | 58 | abstractSoftware* software_; |
---|
| 59 | |
---|
| 60 | std::vector< abstractElement* > elements_; |
---|
[401] | 61 | }; |
---|
[58] | 62 | #endif |
---|