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

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

Désormais il est de nouveau possible d'ajouter des sections et dy affecter des softwares (ne marche pour le moment quavec la 1ere sectionToExecute. Autres améliorations et renommages

File size: 2.4 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   if the previous element is NULL, it will try to add at the beginning of the first section
72   */
73  void addElementAfter(abstractElement*,abstractElement*);
74 
75  /**
76 set the specific software for the given sectionToExecute number
77 */
78  bool setSoftware(nomDeLogiciel, unsigned int sectionToExecuteNumber);
79
80  void clearSectionToExecute();
81  /** Clear a specific jobList */
82  void clearSectionToExecute(int a);
83
84  inline sectorParameters getSectorParameters() {
85    return sectorParam_;
86  }
87
88private:
89
90  std::vector <sectionToExecute*> sectionToExecute_;
91
92  std::string name_;
93  bool reflected_;
94  sector* duplicatedFrom_;
95  unsigned int repetitionNumber_;
96  dataManager* dataManager_;
97  sectorParameters sectorParam_; //xx
98};
99#endif
Note: See TracBrowser for help on using the repository browser.