Line data Source code
1 : template<typename val_type> 2 : class EnumPar { 3 : public: 4 204 : EnumPar(){}; 5 1476 : 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 364 : 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 : };