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 | /** Create a new sectionToExecute and initialize it with the given element |
---|
12 | */ |
---|
13 | sectionToExecute(abstractElement*); |
---|
14 | |
---|
15 | /** Create a new sectionToExecute and initialize it with the given element and software |
---|
16 | */ |
---|
17 | sectionToExecute(abstractElement*,abstractSoftware*); |
---|
18 | |
---|
19 | /** Deprecated : To be removed ! */ |
---|
20 | sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*); |
---|
21 | |
---|
22 | ~sectionToExecute() {;} |
---|
23 | |
---|
24 | inline abstractSoftware* getSoftware() const { |
---|
25 | return software_; |
---|
26 | } |
---|
27 | |
---|
28 | inline abstractSoftware* setSoftware(abstractSoftware* soft) { |
---|
29 | software_ = soft; |
---|
30 | } |
---|
31 | |
---|
32 | /** |
---|
33 | Get the vector of elements of this sector |
---|
34 | */ |
---|
35 | inline std::vector< abstractElement* > getElements() {return elements_;}; |
---|
36 | |
---|
37 | /** |
---|
38 | Get the last element of this section |
---|
39 | */ |
---|
40 | inline abstractElement* getLastElement() {return elements_.back();}; |
---|
41 | |
---|
42 | /** |
---|
43 | Remove the last element of this section |
---|
44 | */ |
---|
45 | inline void removeLastElement() {return elements_.pop_back();}; |
---|
46 | |
---|
47 | bool insertAfter(abstractElement*,abstractElement*); |
---|
48 | |
---|
49 | private : |
---|
50 | |
---|
51 | abstractSoftware* software_; |
---|
52 | |
---|
53 | std::vector< abstractElement* > elements_; |
---|
54 | }; |
---|
55 | #endif |
---|