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