20 #ifndef __mast_parameter_data_h__ 21 #define __mast_parameter_data_h__ 43 add(
const std::string& nm) {
45 return _add_to_map<T>(nm,
_get_map(T()));
51 inline T
get(
const std::string& nm)
const {
53 return _get_from_map<T>(nm,
_get_map(T()));
60 inline std::map<const std::string, int_t>&
67 inline std::map<const std::string, real_t>&
74 inline const std::map<const std::string, int_t>&
81 inline const std::map<const std::string, real_t>&
91 std::map<const std::string, T> &m) {
93 typename std::map<const std::string, T>::iterator
96 Assert0(it == m.end(),
"Data already exists for name: " + nm);
103 template <
typename T>
105 const std::map<const std::string, T> &m)
const {
107 typename std::map<const std::string, T>::const_iterator
110 Assert0(it != m.end(),
"Data does not exist for name: " + nm);
124 #endif // __mast_parameter_data_h__ std::map< const std::string, real_t > & _get_map(real_t v)
T _get_from_map(const std::string &nm, const std::map< const std::string, T > &m) const
std::map< const std::string, int_t > & _get_map(int v)
std::map< const std::string, real_t > _real_data
const std::map< const std::string, int_t > & _get_map(int v) const
T & add(const std::string &nm)
const std::map< const std::string, real_t > & _get_map(real_t v) const
T & _add_to_map(const std::string &nm, std::map< const std::string, T > &m)
std::map< const std::string, int_t > _int_data
#define Assert0(cond, msg)