#ifndef NOMDELEMENTS_SEEN #define NOMDELEMENTS_SEEN #include using namespace std; // enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, snapshot, inconnu}; class nomdElements { public : enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, snapshot, mpole, qpole, spole, inconnu}; private : typedElement e_; // type entier (enum) std::string expandedName_; // nom generique de l'element std::string genericLabel_; unsigned nbParam_; // nombre de parametres a saisir static typedElement fromString(std::string s); static typedElement fromGenericLabel(std::string s); static std::string toExpandedName(typedElement eType); static std::string toGenericLabel(typedElement eType); static unsigned toNbParam(typedElement eType); public : nomdElements(); nomdElements(nomdElements& ne); nomdElements(const nomdElements& ne); nomdElements(const std::string& s); nomdElements(typedElement& eType); static int getNumberOfElements(); static std::string getLabelFromType(typedElement tp); static typedElement getTypeFromLabel(std::string lb); typedElement getElementType() const; std::string getExpandedName() const; std::string getGenericLabel() const; unsigned getElementNbParameters() const; // operators nomdElements& operator= (const nomdElements& ne); }; #endif