source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/expandedMachine.h @ 496

Last change on this file since 496 was 496, checked in by lemeur, 10 years ago

deplacement bouton expand machine vers computing view

File size: 1.7 KB
Line 
1#ifndef EXPANDEDMACHINE_SEEN
2#define EXPANDEDMACHINE_SEEN
3
4#include <iostream>
5#include <vector>
6
7#include "abstractElement.h"
8#include "sector.h"
9#include "computingBlock.h"
10#include "UAP/UAPNode.hpp"
11
12using namespace std;
13
14class expandedMachine
15{
16
17
18
19  expandedMachine() {;}
20
21
22 public :
23
24
25 expandedMachine(dataManager* dtmg) : machineName_("dummy"), dataManager_(dtmg) {;}
26
27  ~expandedMachine() {
28    for ( unsigned k=0; k < computingBlocks_.size(); k++ ) delete computingBlocks_.at(k);
29  }
30
31  void setSoftware(std::string logiciel, computingBlock* cpblk);
32
33
34  void  fromSectors( const vector<sector*>& sect );
35  //  computingBlock* openBlock(dataManager* dmg);
36
37  //  void addNewSector(sector* secteur  );
38
39
40   bool openNewLastBlock();
41
42
43  inline vector<abstractElement*>& getElements() {return elements_;}
44
45
46 inline vector<computingBlock*>& getComputingBlocks() {return computingBlocks_;}
47
48
49
50  abstractElement* getElementFromLabel(string lab);
51  int getElementRankFromLabel(string lab);
52  int getElementRankFromPointer(abstractElement* ptr);
53
54 void FileAMLOutput(UAPNode* root);
55 bool FileAMLInput( UAPNode* entree);
56
57 abstractSoftware* getSoftwarePointer(std::string logiciel, computingBlock* cpblk);
58
59 void setFirstElementOfBlock(computingBlock* bclk, int index);
60 void setLastElementOfBlock(computingBlock* bclk, int index);
61
62 abstractElement* getElementPointer( unsigned rang);
63 
64 bool openNewBlockAfter(computingBlock* cpbl);
65
66
67 bool areDataCoherent();
68
69 bool eraseComputingBlock(computingBlock* );
70
71 inline unsigned numberOfElements() { return elements_.size(); }
72 private:
73
74 void clearComputingBlock(int a);
75
76  dataManager* dataManager_;
77  string machineName_;
78  vector<abstractElement*> elements_;
79  vector<computingBlock*> computingBlocks_;
80};
81
82#endif
Note: See TracBrowser for help on using the repository browser.