23 #include <interfaces/generator/checker.h>
24 #include <interfaces/generator/enum_constant.h>
25 #include <interfaces/generator/exceptions.h>
67 const std::vector<InterfaceEnumConstant::EnumItem> &
82 std::vector<EnumItem>::iterator i;
83 for (i = items_.begin(); i != items_.end(); ++i) {
84 if (i->name == name) {
88 EnumItem p = {name, comment,
false, 0};
100 std::vector<EnumItem>::iterator i;
101 for (i = items_.begin(); i != items_.end(); ++i) {
102 if (i->name == name) {
106 EnumItem p = {name, comment,
true, value};
static bool validName(const std::string &name, const std::set< std::string > &reserved_names)
Check identifiers.
const std::string & get_name() const
Get name of enum constant.
void add_item(std::string name, std::string comment)
Add an item without custom value.
InterfaceEnumConstant(const std::string &name, const std::string &comment)
Constructor.
const std::vector< EnumItem > & get_items() const
Get enumeration items.
const std::string & get_comment() const
Get comment of enum constant.
Thrown if name is ambiguous.
Thrown if something is a reserved identifier.