80 constexpr bool same(
char const *x,
char const *y) {
81 return !*x && !*y ?
true : (*x == *y && same(x+1, y+1));
85 return !entries->name ? 0 :
86 entries->type == type ? entries->name :
87 objectIdToString(type, entries+1);
91 return !entries->name ?
invalid :
92 same(entries->name, name) ? entries->type :
93 stringToObjectId(name, entries+1);
101 return stringToId(name.c_str());
108 return idToString(type);
118 <<
"Unknown alignableObjectId " <<
type;
130 <<
"Unknown alignableObjectId " <<
name;
std::string typeToName(align::StructureType type) const
Convert type to name.
static align::StructureType stringToId(const char *)
align::StructureType nameToType(const std::string &name) const
Convert name to type.
static const char * idToString(align::StructureType type)