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

Last change on this file since 488 was 487, checked in by touze, 10 years ago

ajout de quadrupole et sextupole

File size: 1.3 KB
Line 
1#ifndef NOMDELEMENTS_SEEN
2#define NOMDELEMENTS_SEEN
3
4#include <string>
5using namespace std;
6
7// enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, snapshot, inconnu};
8
9class nomdElements
10{
11
12 public :
13
14  enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, snapshot, mpole, qpole, spole, inconnu};
15
16 private : 
17
18  typedElement e_;  // type entier (enum)
19  std::string expandedName_;  // nom generique de l'element
20  std::string genericLabel_; 
21  unsigned nbParam_;   // nombre de parametres a saisir
22
23  static   typedElement fromString(std::string s);
24  static   typedElement fromGenericLabel(std::string s);
25  static   std::string toExpandedName(typedElement eType);
26  static   std::string toGenericLabel(typedElement eType);
27  static   unsigned toNbParam(typedElement eType);
28
29 public :
30 
31  nomdElements();
32  nomdElements(nomdElements& ne);
33  nomdElements(const nomdElements& ne);
34  nomdElements(const std::string& s);
35  nomdElements(typedElement& eType); 
36
37
38  static int getNumberOfElements();
39  static std::string getLabelFromType(typedElement tp);
40  static typedElement getTypeFromLabel(std::string lb);
41
42  typedElement getElementType() const;
43  std::string getExpandedName() const;
44  std::string getGenericLabel() const;
45  unsigned getElementNbParameters() const;
46
47  // operators
48 
49  nomdElements& operator= (const nomdElements& ne);
50
51
52};
53#endif
Note: See TracBrowser for help on using the repository browser.