19 #ifndef StringBijection_h 20 #define StringBijection_h 51 #pragma warning(disable:4510 4512 4610) // no default constructor and no assignment operator; conflicts with initializer 69 }
while (entries[i++].
key != terminatorKey);
73 void insert(
const std::string
str,
const T
key,
bool checkDuplicates =
true) {
74 if (checkDuplicates) {
93 void remove(
const std::string
str,
const T
key) {
99 T
get(
const std::string&
str)
const {
134 std::vector<std::string> result;
135 typename std::map<T, std::string>::const_iterator it;
137 result.push_back(it->second);
144 typename std::map<T, std::string>::const_iterator it;
146 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