48 const std::vector<t_enum_value*>& enum_values =
get_constants();
49 std::vector<t_enum_value*>::const_iterator c_iter;
50 for (c_iter = enum_values.begin(); c_iter != enum_values.end(); ++c_iter) {
51 if ((*c_iter)->get_name() == name) {
59 const std::vector<t_enum_value*>& enum_values =
get_constants();
60 std::vector<t_enum_value*>::const_iterator c_iter;
61 for (c_iter = enum_values.begin(); c_iter != enum_values.end(); ++c_iter) {
62 if ((*c_iter)->get_value() == value) {
78 const std::vector<t_enum_value*>& enum_values =
get_constants();
79 std::vector<t_enum_value*>::const_iterator c_iter;
81 for (c_iter = enum_values.begin(); c_iter != enum_values.end(); ++c_iter) {
82 if (! (*c_iter)->has_value()) {
83 (*c_iter)->set_value(++lastValue);
85 lastValue = (*c_iter)->get_value();
t_enum(t_program *program)
void set_name(const std::string &name)
void append(t_enum_value *constant)
t_enum_value * get_constant_by_name(const std::string name)
t_enum_value * get_constant_by_value(int64_t value)
virtual std::string get_fingerprint_material() const
const std::vector< t_enum_value * > & get_constants()
std::vector< t_enum_value * > constants_