source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/nomDeLogiciel.h @ 486

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

ajout <algorithm> dans nomDeLogiciel.h

File size: 1.8 KB
RevLine 
[58]1#ifndef NOMDELOGICIEL_SEEN
2#define NOMDELOGICIEL_SEEN
3
[485]4#include "trivaluedBool.h"
5#include "nomdElements.h"
6
[58]7#include <string> 
[485]8#include <vector>
[486]9#include <algorithm>
[485]10#include <iostream>
[160]11using namespace std;
[58]12
13class nomDeLogiciel
14{
15
[431]16 public : 
17 
[107]18  enum Logiciel
[58]19  {
[442]20    parmela, transport, generator, test, madx, usersprogram, unknownSoftware
[316]21  };
[431]22 
[401]23   
[431]24 private :
[58]25
[107]26  Logiciel program_;
27  std::string progString_;
[485]28
29  /**
30     Accepted elements list for this software
31  */
32  std::vector <nomdElements::typedElement> acceptedElements_;
33
34  /**
35     Ignore software list for this element
36  */
37  std::vector <nomdElements::typedElement> ignoredElements_;
38
[431]39   
[160]40  static Logiciel fromString( std::string s);
41  static std::string toString( Logiciel lg); 
[418]42  std::string getWtColor( nomDeLogiciel::Logiciel lg) const;
[107]43 
[485]44  void registerElement(nomdElements::typedElement nomdel,trivaluedBool b); 
45  void setCompatiblesElements(); 
46
47  nomDeLogiciel(); 
48
[107]49 public : 
[431]50 
[160]51  nomDeLogiciel(const string& s); 
52  nomDeLogiciel(int val);
53  static int getNumberOfSoftwares();
[107]54 
55  inline std::string getString() const {return progString_;}
[431]56  inline nomDeLogiciel::Logiciel getLogiciel() const {return program_;}
[418]57
[485]58
59  inline const std::vector<nomdElements::typedElement>& acceptedElements() const { return acceptedElements_;
60  }
61
62  inline const std::vector<nomdElements::typedElement>& ignoredElements() const { return ignoredElements_;
63  }
64
65  trivaluedBool doAcceptElement(nomdElements::typedElement typdel); 
66
67
[431]68  /** Color of the background of the sofware
69      Should be a valid Css name as FFEEDD
70  */
[418]71  inline std::string  getColor() const {return getWtColor(program_);}
[107]72  // operators
[160]73  nomDeLogiciel& operator= (const nomDeLogiciel& nl); 
74  bool operator== (const nomDeLogiciel& nl); 
75  bool operator!= (const nomDeLogiciel& nl);
[58]76};
77#endif
Note: See TracBrowser for help on using the repository browser.