10 #ifndef mrpt_utils_parameters_H 11 #define mrpt_utils_parameters_H 20 #include <mrpt/config.h> 53 typedef std::map<std::string,T>
BASE;
68 nam = va_arg(args,
const char*);
92 else return it->second;
105 size_t maxStrLen = 10;
108 std::stringstream str;
110 str << it->first <<
std::string(maxStrLen-it->first.size(),
' ') <<
" = " << it->second << std::endl;
For usage when passing a dynamic number of (numeric) arguments to a function, by name.
std::string getAsString() const
Returns a multi-line string representation of the parameters like : 'nam = val = val2...'.
TParameters< double > TParametersDouble
See the generic template mrpt::utils::TParameters.
EIGEN_STRONG_INLINE iterator begin()
const Scalar * const_iterator
const_iterator find(const KEY &key) const
VALUE & operator[](const KEY &key)
Write/read via [i] operator, that creates an element if it didn't exist already.
TParameters< std::string > TParametersString
See the generic template mrpt::utils::TParameters.
void dumpToConsole() const
Dumps to console the output from getAsString()
TParameters(const char *nam1,...)
Constructor with a list of initial values (see the description and use example in mrpt::utils::TParam...
T operator[](const std::string &s) const
A const version of the [] operator, for usage as read-only.
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
T & operator[](const std::string &s)
The write (non-const) version of the [] operator.
T getWithDefaultVal(const std::string &s, const T &defaultVal) const
A const version of the [] operator and with a default value in case the parameter is not set (for usa...
std::map< std::string, T > BASE
TParameters()
Default constructor (initializes empty)
bool has(const std::string &s) const
void getAsString(std::string &s) const
Returns a multi-line string representation of the parameters like : 'nam = val = val2...'.