source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/nomdElements.h @ 271

Last change on this file since 271 was 271, checked in by lemeur, 11 years ago

etiquettes par defaut

File size: 1.2 KB
Line 
1#ifndef NOMDELEMENTS_SEEN
2#define NOMDELEMENTS_SEEN
3
4using namespace std;
5
6enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, inconnu};
7
8
9
10class nomdElements
11{
12  typedElement e_;  // type entier (enum)
13  std::string eName_;  // nom de l'element
14  std::string eLabel_; // label affiche sous l'icone
15  unsigned nbParam_;   // nombre de parametres a saisir
16
17  static   typedElement fromString(std::string s);
18  static   typedElement fromLabel(std::string s);
19  static   std::string toName(typedElement eType);
20  static   std::string toLabel(typedElement eType);
21  static   unsigned toNbParam(typedElement eType);
22
23 public :
24 
25  nomdElements();
26  nomdElements(nomdElements& ne);
27  nomdElements(const nomdElements& ne);
28  nomdElements(const std::string& s);
29  nomdElements(typedElement& eType); 
30
31
32  static int getNumberOfElements();
33  static std::string getLabelFromType(typedElement tp);
34  static typedElement getTypeFromLabel(std::string lb);
35
36  typedElement getElementType() const;
37  std::string getElementName() const;
38  std::string getElementLabel() const;
39  unsigned getElementNbParameters() const;
40
41  // operators
42 
43  nomdElements& operator= (const nomdElements& ne);
44
45
46};
47#endif
Note: See TracBrowser for help on using the repository browser.