|
MVSim
Lightweight simulator for 2.5D vehicles and robots
|
#include <TParameterDefinitions.h>
Public Member Functions | |
| template<typename T > | |
| TParamEntry (const char *format_, T *targetVariable) | |
| void | parse (const std::string &str, const std::string &varName, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="") const |
Public Attributes | |
| const char * | format = nullptr |
| void * | val = nullptr |
Normal case: sscanf()-like specifiers, and "void*" pointing to corresponding variable type. Special cases:
| void mvsim::TParamEntry::parse | ( | const std::string & | str, |
| const std::string & | varName, | ||
| const std::map< std::string, std::string > & | variableNamesValues = {}, |
||
| const char * | functionNameContext = "" |
||
| ) | const |
Tries to parse the given input string according to the expected format, then store the result in "*val"
| std::runtime_error | On format errors. |