source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/sector.h @ 472

Last change on this file since 472 was 472, checked in by garnier, 11 years ago

Modification pour remettre en marche le Run. Desormais Transport passe, mais aucun test ne permet de dire si c est bon

File size: 2.6 KB
Line 
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
12class sectionToExecute;
13class abstractElement;
14class dataManager;
15
16class 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  /**
78 set the specific software for the given sectionToExecute number
79 */
80  bool setSoftware(nomDeLogiciel, unsigned int sectionToExecuteNumber);
81
82  void clearSectionToExecute();
83  /** Clear a specific jobList */
84  void clearSectionToExecute(int a);
85
86  inline sectorParameters getSectorParameters() {
87    return sectorParam_;
88  }
89
90  inline particleBeam* getParticleBeam() {
91    return currentBeam_;
92  }
93 
94  inline void setParticleBeam(particleBeam* part) {
95    currentBeam_ = part;
96  }
97 
98private:
99
100  std::vector <sectionToExecute*> sectionToExecute_;
101  particleBeam* currentBeam_;
102
103  std::string name_;
104  bool reflected_;
105  sector* duplicatedFrom_;
106  unsigned int repetitionNumber_;
107  dataManager* dataManager_;
108  sectorParameters sectorParam_; //xx
109};
110#endif
Note: See TracBrowser for help on using the repository browser.