22 #ifndef StringBijection_h 23 #define StringBijection_h 58 #pragma warning(disable:4510 4512 4610) // no default constructor and no assignment operator; conflicts with initializer 76 }
while (entries[i++].
key != terminatorKey);
80 void insert(
const std::string
str,
const T
key,
bool checkDuplicates =
true) {
81 if (checkDuplicates) {
100 void remove(
const std::string
str,
const T
key) {
106 T
get(
const std::string&
str)
const {
141 std::vector<std::string> result;
142 typename std::map<T, std::string>::const_iterator it;
144 result.push_back(it->second);
151 typename std::map<T, std::string>::const_iterator it;
153 list.push_back(it->first);
const std::string & getString(const T key) const
bool has(const T key) const
std::vector< std::string > getStrings() const
void insert(const std::string str, const T key, bool checkDuplicates=true)
std::map< std::string, T > myString2T
std::map< T, std::string > myT2String
void addAlias(const std::string str, const T key)
void addKeysInto(std::vector< T > &list) const
StringBijection(Entry entries[], T terminatorKey, bool checkDuplicates=true)
bool hasString(const std::string &str) const