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

Last change on this file since 431 was 431, checked in by touze, 11 years ago

systeme periodique (mailles) + multipoles + madx

File size: 1.0 KB
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  enum Logiciel
14  {
15    parmela, transport, generator, useraction, test, madx, unknownSoftware
16  };
17 
18   
19 private :
20
21  Logiciel program_;
22  std::string progString_;
23   
24  static Logiciel fromString( std::string s);
25  static std::string toString( Logiciel lg); 
26  std::string getWtColor( nomDeLogiciel::Logiciel lg) const;
27 
28 public : 
29 
30  nomDeLogiciel(); 
31  nomDeLogiciel(const string& s); 
32  nomDeLogiciel(int val);
33  static int getNumberOfSoftwares();
34 
35  inline std::string getString() const {return progString_;}
36  inline nomDeLogiciel::Logiciel getLogiciel() const {return program_;}
37
38  /** Color of the background of the sofware
39      Should be a valid Css name as FFEEDD
40  */
41  inline std::string  getColor() const {return getWtColor(program_);}
42  // operators
43  nomDeLogiciel& operator= (const nomDeLogiciel& nl); 
44  bool operator== (const nomDeLogiciel& nl); 
45  bool operator!= (const nomDeLogiciel& nl);
46};
47#endif
Note: See TracBrowser for help on using the repository browser.