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

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

grosse modification pour intégrer les sections

File size: 2.3 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
10class sectionToExecute;
11class abstractElement;
12class dataManager;
13
14class sector
15{
16  public :
17 
18  sector(dataManager*, std::string name = "sector default name");
19  virtual ~sector();
20  /**
21   Set if this sector is reflected
22   */
23  inline void setReflected(bool r) { reflected_ = r;};
24  /**
25   Get if this sector is reflected
26   */
27  inline bool getReflected() { return reflected_;};
28
29  /**
30   Set the original sector from where this sector is reflected/duplicated
31   */
32  inline void setDuplicatedFrom(sector* s) { duplicatedFrom_ = s;};
33  /**
34   Get the original sector from where this sector is reflected/duplicated. Return NULL if not
35   */
36  inline sector* getDuplicatedFrom() { return duplicatedFrom_;};
37
38
39  /**
40   Set the repetition number
41   */
42  inline void setRepetitionNumber(unsigned int n) { repetitionNumber_ = n;};
43  /**
44   Get the repetition number
45   */
46  inline unsigned int getRepetitionNumber() { return repetitionNumber_;};
47
48  /**
49   Set the name
50   */
51  inline void setName(std::string name) { name_ = name;};
52  /**
53   Get the name
54   */
55  inline std::string getName() { return name_;};
56 
57  /**
58   Return the vector of sectionToExecute of this
59   */
60  inline std::vector <sectionToExecute*> getSectionsToExecute() { return sectionToExecute_;};
61 
62  /**
63   Add a sectionToExecute
64   */
65  inline void addSectionToExecute(sectionToExecute* s) {
66    if (s) sectionToExecute_.push_back(s);
67  };
68 
69  /** Add an element after another one. Will put it in the same sectionToExecuteList. If the element after is NULL
70   it will create a new sectionToExecute and put it inside.
71   */
72  void addElementAfter(abstractElement*,abstractElement*);
73 
74  /**
75 set the specific software for the given sectionToExecute number
76 */
77  bool setSoftware(nomDeLogiciel, unsigned int sectionToExecuteNumber);
78
79  void clearSectionToExecute();
80  /** Clear a specific jobList */
81  void clearSectionToExecute(int a);
82
83  inline sectorParameters getSectorParameters() {
84    return sectorParam_;
85  }
86
87private:
88
89  std::vector <sectionToExecute*> sectionToExecute_;
90
91  std::string name_;
92  bool reflected_;
93  sector* duplicatedFrom_;
94  unsigned int repetitionNumber_;
95  dataManager* dataManager_;
96  sectorParameters sectorParam_; //xx
97};
98#endif
Note: See TracBrowser for help on using the repository browser.