- unsigned id=parse_int();
- EnumMap::iterator i=enums.find(id);
- if(i==enums.end())
- throw KeyError("Unknown enum");
+ return lookup_string(parse_int());
+}
+
+const string &BinaryParser::lookup_string(unsigned id) const
+{
+ StringMap::const_iterator i = strings.find(id);
+ if(i==strings.end())
+ throw_at(KeyError("Unknown string", lexical_cast(id)), src);