Line data Source code
1 : template<typename val_type> 2 : class EnumPar { 3 : public: 4 136 : EnumPar(){}; 5 984 : EnumPar& operator () ( int id, std::string str, std::string desc ){ id_=id; str_=str; desc_=desc; val_=0; return *this; } 6 : EnumPar& operator () ( int id, std::string str, std::string desc, val_type* val ){ id_=id; str_=str; desc_=desc; val_=val; return *this; } 7 : int id() { return id_; } 8 0 : std::string str() { return str_; } 9 : std::string desc(){ return desc_; } 10 : val_type val() { return *val_; } 11 : 12 : private: 13 : int id_; 14 : std::string str_; 15 : std::string desc_; 16 : val_type* val_; 17 : };