29 stringMap.insert(pair<long, const char* const>(i, s));
33 i2s_map_t::const_iterator searchPtr = stringMap.find(i);
35 if (searchPtr == stringMap.end())
36 return "[OUT-OF-RANGE]";
42 for (i = stringMap.count(i); i > 0 ; --i, ++searchPtr) {
44 assert(searchPtr != stringMap.end());
45 if (result.length() != 0)
46 result += string(
",");
47 result += string(searchPtr->second);
61 i2s_map_t::const_iterator run = stringMap.begin();
62 while (run != stringMap.end() && strcmp(s, run->second)) {
65 if (run == stringMap.end())
71 return (stringMap.find(i) != stringMap.end());
bool inRange(long) const
returns true, if we have an representation for the given integer.
void add(long, const char *)
adds a new int -> string mapping Does NOT take over responsibility for the pointer (i....
i2s_map_t stringMap
just for the record.
std::string lookup(long) const
returns the string representation for this integer.