#ifndef NOMDELOGICIEL_SEEN #define NOMDELOGICIEL_SEEN #include "trivaluedBool.h" #include "nomdElements.h" #include #include #include #include using namespace std; class nomDeLogiciel { public : enum Logiciel { parmela, transport, generator, test, madx, usersprogram, unknownSoftware }; private : Logiciel program_; std::string progString_; /** Accepted elements list for this software */ std::vector acceptedElements_; /** Ignore software list for this element */ std::vector ignoredElements_; static Logiciel fromString( std::string s); static std::string toString( Logiciel lg); std::string getWtColor( nomDeLogiciel::Logiciel lg) const; void registerElement(nomdElements::typedElement nomdel,trivaluedBool b); void setCompatiblesElements(); nomDeLogiciel(); public : nomDeLogiciel(const string& s); nomDeLogiciel(int val); static int getNumberOfSoftwares(); inline std::string getString() const {return progString_;} inline nomDeLogiciel::Logiciel getLogiciel() const {return program_;} inline const std::vector& acceptedElements() const { return acceptedElements_; } inline const std::vector& ignoredElements() const { return ignoredElements_; } trivaluedBool doAcceptElement(nomdElements::typedElement typdel); /** Color of the background of the sofware Should be a valid Css name as FFEEDD */ inline std::string getColor() const {return getWtColor(program_);} // operators nomDeLogiciel& operator= (const nomDeLogiciel& nl); bool operator== (const nomDeLogiciel& nl); bool operator!= (const nomDeLogiciel& nl); }; #endif