66 #ifndef Support_String_Table_hpp 67 #define Support_String_Table_hpp 78 bool operator() (
const std::string *s1,
const std::string *s2)
85 typedef std::map <const std::string *, long, StringCompare>
StringMap;
86 typedef std::vector <const std::string *>
StringVec;
98 m_invalid =
"invalid-string";
104 for (
long i = 0; i < (long) m_vec.size(); i++) {
112 StringMap::iterator it = m_map.find(&str);
114 if (it != m_map.end()) {
119 const std::string *
copy =
new std::string(str);
120 m_vec.push_back(copy);
121 long index = m_vec.size() - 1;
129 if (index < 0 || index >= (
long) m_vec.size()) {
132 return *(m_vec[index]);
long str2index(const std::string &str)
std::vector< const std::string * > StringVec
void copy(const char *dst,...)
std::map< const std::string *, long, StringCompare > StringMap
const std::string & index2str(long index)
bool operator()(const std::string *s1, const std::string *s2)