21 #ifndef StringBijection_h 22 #define StringBijection_h 57 #pragma warning(disable:4510 4512 4610) // no default constructor and no assignment operator; conflicts with initializer 75 }
while (entries[i++].
key != terminatorKey);
79 void insert(
const std::string
str,
const T
key,
bool checkDuplicates =
true) {
80 if (checkDuplicates) {
99 void remove(
const std::string
str,
const T
key) {
105 T
get(
const std::string&
str)
const {
140 std::vector<std::string> result;
141 typename std::map<T, std::string>::const_iterator it;
143 result.push_back(it->second);
150 typename std::map<T, std::string>::const_iterator it;
152 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