source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/sectionToExecute.h @ 474

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

prise en charge de la restauration dun fichier de sauvegarde

File size: 1.6 KB
Line 
1#ifndef SECTIONTOEXECUTE_SEEN
2#define SECTIONTOEXECUTE_SEEN
3
4#include "nomDeLogiciel.h"
5#include "abstractElement.h"
6#include "abstractSoftware.h"
7#include "sector.h"
8
9class sectionToExecute
10{
11 public :
12
13  /** Create a new sectionToExecute and initialize it with the given element and software
14   */
15  sectionToExecute(abstractElement*,abstractSoftware*,dataManager*,sector*);
16 
17  /** Deprecated : To be removed ! */
18  sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*);
19
20  ~sectionToExecute() {;}
21
22  inline abstractSoftware* getSoftware() const {
23    return software_;
24  }
25 
26  inline void setSoftware(abstractSoftware* soft) {
27    software_ = soft;
28  }
29 
30/**
31 Set a software according to the corresponding given string.
32 If not found, set a softwareUnknown
33 */
34  void setSoftware(std::string);
35
36  /**
37   Get the vector of elements of this sector
38   */
39  inline std::vector< abstractElement* > getElements() {return elements_;};
40 
41  /**
42   Get the last element of this section
43   */
44  inline abstractElement*  getLastElement() {return elements_.back();};
45 
46  /**
47   Remove the last element of this section
48   */
49  inline void removeLastElement() {return elements_.pop_back();};
50
51  bool insertAfter(abstractElement*,abstractElement*);
52
53  inline bool insertAtFirst(abstractElement* abs) {
54    elements_.insert ( elements_.begin() ,abs);
55  };
56
57  /** Set the first element of this section.
58   If needed, it will change the last element of the previous section
59   */
60  void setFirstElement(std::string);
61 
62  private :
63
64  abstractSoftware* software_;
65  dataManager* dataManager_;
66  std::vector< abstractElement* > elements_;
67  sector* sector_;
68};
69#endif
Note: See TracBrowser for help on using the repository browser.