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

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

Impleméntation en partie de setFirstElement

File size: 1.6 KB
RevLine 
[58]1#ifndef SECTIONTOEXECUTE_SEEN
2#define SECTIONTOEXECUTE_SEEN
3
4#include "nomDeLogiciel.h"
[401]5#include "abstractElement.h"
6#include "abstractSoftware.h"
[474]7#include "sector.h"
[58]8
[401]9class sectionToExecute
[58]10{
[431]11 public :
[58]12
[455]13  /** Create a new sectionToExecute and initialize it with the given element and software
14   */
[474]15  sectionToExecute(abstractElement*,abstractSoftware*,dataManager*,sector*);
[431]16 
17  /** Deprecated : To be removed ! */
18  sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*);
[413]19
[431]20  ~sectionToExecute() {;}
[401]21
[431]22  inline abstractSoftware* getSoftware() const {
[455]23    return software_;
[431]24  }
25 
[469]26  inline void setSoftware(abstractSoftware* soft) {
[455]27    software_ = soft;
28  }
29 
[469]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
[455]36  /**
37   Get the vector of elements of this sector
38   */
39  inline std::vector< abstractElement* > getElements() {return elements_;};
40 
[468]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
[455]51  bool insertAfter(abstractElement*,abstractElement*);
[431]52
[469]53  inline bool insertAtFirst(abstractElement* abs) {
54    elements_.insert ( elements_.begin() ,abs);
55  };
[474]56
57  /** Set the first element of this section.
58   If needed, it will change the last element of the previous section
59   */
[476]60  void setFirstElement(int);
[469]61 
[455]62  private :
[431]63
[455]64  abstractSoftware* software_;
[472]65  dataManager* dataManager_;
[455]66  std::vector< abstractElement* > elements_;
[474]67  sector* sector_;
[401]68};
[58]69#endif
Note: See TracBrowser for help on using the repository browser.