1 | #ifndef SECTIONTOEXECUTE_SEEN |
---|
2 | #define SECTIONTOEXECUTE_SEEN |
---|
3 | |
---|
4 | #include "nomDeLogiciel.h" |
---|
5 | #include "abstractElement.h" |
---|
6 | #include "abstractSoftware.h" |
---|
7 | |
---|
8 | class sectionToExecute |
---|
9 | { |
---|
10 | public : |
---|
11 | |
---|
12 | /** Create a new sectionToExecute and initialize it with the given element and software |
---|
13 | */ |
---|
14 | sectionToExecute(abstractElement*,abstractSoftware*,dataManager*); |
---|
15 | |
---|
16 | /** Deprecated : To be removed ! */ |
---|
17 | sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*); |
---|
18 | |
---|
19 | ~sectionToExecute() {;} |
---|
20 | |
---|
21 | inline abstractSoftware* getSoftware() const { |
---|
22 | return software_; |
---|
23 | } |
---|
24 | |
---|
25 | inline void setSoftware(abstractSoftware* soft) { |
---|
26 | software_ = soft; |
---|
27 | } |
---|
28 | |
---|
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 | |
---|
35 | /** |
---|
36 | Get the vector of elements of this sector |
---|
37 | */ |
---|
38 | inline std::vector< abstractElement* > getElements() {return elements_;}; |
---|
39 | |
---|
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 | |
---|
50 | bool insertAfter(abstractElement*,abstractElement*); |
---|
51 | |
---|
52 | inline bool insertAtFirst(abstractElement* abs) { |
---|
53 | elements_.insert ( elements_.begin() ,abs); |
---|
54 | }; |
---|
55 | |
---|
56 | private : |
---|
57 | |
---|
58 | abstractSoftware* software_; |
---|
59 | dataManager* dataManager_; |
---|
60 | std::vector< abstractElement* > elements_; |
---|
61 | }; |
---|
62 | #endif |
---|