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