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

Last change on this file since 257 was 257, checked in by garnier, 11 years ago

refactoring

File size: 851 bytes
Line 
1#ifndef NOMDELOGICIEL_SEEN
2#define NOMDELOGICIEL_SEEN
3
4#include <string> 
5
6using namespace std;
7
8class nomDeLogiciel
9{
10
11 public: 
12
13
14  enum Logiciel
15  {
16    parmela, transport, unknownSoftware
17  }; 
18
19
20 private:
21
22  Logiciel program_;
23  std::string progString_;
24  int value_;
25
26  static Logiciel fromString( std::string s);
27  static std::string toString( Logiciel lg); 
28  static Logiciel fromValue( int v); 
29  static int toValue( Logiciel lg);
30 
31 public : 
32  // constructors
33 
34  nomDeLogiciel(); 
35  nomDeLogiciel(const string& s); 
36  nomDeLogiciel(int val);
37 
38  static int getNumberOfSoftwares();
39 
40  inline std::string getString() const {return progString_;}
41 
42  // operators
43 
44  nomDeLogiciel& operator= (const nomDeLogiciel& nl); 
45  bool operator== (const nomDeLogiciel& nl); 
46  bool operator!= (const nomDeLogiciel& nl);
47 
48};
49
50
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.