1 #ifndef TOOLS_TYPE_MAP_H 2 #define TOOLS_TYPE_MAP_H 47 void insert(
int id,
const std::string& name);
54 void read(std::istream& in);
59 int id(
const std::string& name)
const;
64 const std::string& name(
int id)
const;
74 std::map<std::string, int> ids_;
77 std::map<int, std::string> names_;
84 std::map<std::string, int>::const_iterator iter = ids_.find(name);
85 if (iter == ids_.end()) {
94 std::map<int, std::string>::const_iterator iter = names_.find(
id);
95 if (iter == names_.end()) {
103 {
return names_.size(); }
File containing preprocessor macros for error handling.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Utility classes for scientific computation.