29 #ifndef mrpt_utils_parameters_H
30 #define mrpt_utils_parameters_H
66 typedef std::map<std::string,T>
BASE;
77 BASE::operator[](std::string(nam1)) = val;
81 nam = va_arg(args,
const char*);
84 BASE::operator[](std::string(nam)) = val;
96 throw std::logic_error(std::string(
"Parameter '")+s+std::string(
"' is not present.").c_str());
105 else return it->second;
108 inline T &
operator[](
const std::string &s) {
return BASE::operator[](s); }
118 size_t maxStrLen = 10;
121 std::stringstream str;
123 str << it->first << std::string(maxStrLen-it->first.size(),
' ') <<
" = " << it->second << std::endl;