#ifndef NOMDELEMENTS_SEEN #define NOMDELEMENTS_SEEN using namespace std; enum typedElement {beam, RFgun, drift, cell, bend, soleno, fit, snapshot, inconnu}; class nomdElements { typedElement e_; // type entier (enum) std::string eName_; // nom de l'element std::string eLabel_; // label affiche sous l'icone unsigned nbParam_; // nombre de parametres a saisir static typedElement fromString(std::string s); static typedElement fromLabel(std::string s); static std::string toName(typedElement eType); static std::string toLabel(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 getElementName() const; std::string getElementLabel() const; unsigned getElementNbParameters() const; // operators nomdElements& operator= (const nomdElements& ne); }; #endif