20 #ifndef T_CONST_VALUE_H
21 #define T_CONST_VALUE_H
28 #include <boost/uuid/uuid.hpp>
29 #include <boost/uuid/string_generator.hpp>
75 throw "have identifier \"" +
get_identifier() +
"\", but unset enum on line!";
78 std::string::size_type dot = identifier.rfind(
'.');
79 if (dot != std::string::npos) {
80 identifier = identifier.substr(dot+1);
85 "Unable to find enum value \"" + identifier +
108 throw "Invalid UUID value \"" +
stringVal_ +
"\"" ;
121 const std::map<t_const_value*, t_const_value*>&
get_map()
const {
133 const std::vector<t_const_value*>&
get_list()
const {
148 size_t s = ret.find(
'.');
149 if (s == std::string::npos) {
150 throw "error: identifier " + ret +
" is unqualified!";
152 ret = ret.substr(s+1);
154 if (s != std::string::npos) {
155 ret = ret.substr(s+1);
162 size_t s = ret.find(
'.');
163 if (s == std::string::npos) {
164 throw "error: identifier " + ret +
" is unqualified!";
166 size_t s2 = ret.find(
'.', s+1);
167 if (s2 != std::string::npos) {
168 ret = ret.substr(s+1);
182 std::map<t_const_value*, t_const_value*>
mapVal_;
void set_string(std::string val)
void set_enum(t_enum *tenum)
std::string get_identifier_name() const
std::string identifierVal_
std::string get_identifier_with_parent() const
void set_integer(int64_t val)
const std::map< t_const_value *, t_const_value * > & get_map() const
void set_identifier(std::string val)
int64_t get_integer() const
t_const_value_type get_type() const
std::vector< t_const_value * > listVal_
t_const_value(std::string val)
t_const_value_type valType_
t_enum_value * get_constant_by_name(const std::string name)
std::string get_uuid() const
void set_double(double val)
std::string get_identifier() const
virtual const std::string & get_name() const
std::string get_string() const
double get_double() const
std::map< t_const_value *, t_const_value * > mapVal_
t_const_value(int64_t val)
void add_list(t_const_value *val)
void add_map(t_const_value *key, t_const_value *val)
const std::vector< t_const_value * > & get_list() const