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

Last change on this file since 449 was 449, checked in by garnier, 10 years ago

Modifications en vue de changer l'interface utilisateur

File size: 1.8 KB
Line 
1#ifndef SECTOR_SEEN
2#define SECTOR_SEEN
3
4#include <vector>
5#include "sectionToExecute.h"
6
7class sector
8{
9  public :
10 
11  sector(std::string name = "sector default name");
12  virtual ~sector();
13  /**
14   Set if this sector is reflected
15   */
16  inline void setReflected(bool r) { reflected_ = r;};
17  /**
18   Get if this sector is reflected
19   */
20  inline bool getReflected() { return reflected_;};
21
22  /**
23   Set the original sector from where this sector is reflected/duplicated
24   */
25  inline void setDuplicatedFrom(sector* s) { duplicatedFrom_ = s;};
26  /**
27   Get the original sector from where this sector is reflected/duplicated. Return NULL if not
28   */
29  inline sector* getDuplicatedFrom() { return duplicatedFrom_;};
30
31
32  /**
33   Set the repetition number
34   */
35  inline void setRepetitionNumber(unsigned int n) { repetitionNumber_ = n;};
36  /**
37   Get the repetition number
38   */
39  inline unsigned int getRepetitionNumber() { return repetitionNumber_;};
40
41  /**
42   Set the name
43   */
44  inline void setName(std::string name) { name_ = name;};
45  /**
46   Get the name
47   */
48  inline std::string getName() { return name_;};
49
50  /**
51   Return the vector of sectors inside this sector
52   */
53  inline std::vector <sector*> getInnerSectors() { return sectors_;};
54
55  /**
56   Add an inner sector
57   */
58  inline void addInnerSector(sector* s) {
59    if (s) sectors_.push_back(s);
60  };
61 
62  /**
63   Return the vector of sectionToExecute of this
64   */
65  inline std::vector <sectionToExecute*> getSectionsToExecute() { return sectionToExecute_;};
66 
67  /**
68   Add a sectionToExecute
69   */
70  inline void addSectionToExecute(sectionToExecute* s) {
71    if (s) sectionToExecute_.push_back(s);
72  };
73 
74private:
75  std::vector <sector*> sectors_;
76  std::vector <sectionToExecute*> sectionToExecute_;
77
78  std::string name_;
79  bool reflected_;
80  sector* duplicatedFrom_;
81  unsigned int repetitionNumber_;
82};
83#endif
Note: See TracBrowser for help on using the repository browser.