|
| static const ParametersMap & | getDefaultParameters () |
| |
| static std::string | getType (const std::string ¶mKey) |
| |
| static std::string | getDescription (const std::string ¶mKey) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, bool &value) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, int &value) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, unsigned int &value) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, float &value) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, double &value) |
| |
|
static bool | parse (const ParametersMap ¶meters, const std::string &key, std::string &value) |
| |
|
static void | parse (const ParametersMap ¶meters, ParametersMap ¶metersOut) |
| |
|
static const char * | showUsage () |
| |
|
static ParametersMap | parseArguments (int argc, char *argv[], bool onlyParameters=false) |
| |
|
static std::string | getVersion () |
| |
|
static std::string | getDefaultDatabaseName () |
| |
|
static std::string | serialize (const ParametersMap ¶meters) |
| |
|
static ParametersMap | deserialize (const std::string ¶meters) |
| |
|
static bool | isFeatureParameter (const std::string ¶m) |
| |
|
static ParametersMap | getDefaultOdometryParameters (bool stereo=false, bool vis=true, bool icp=false) |
| |
|
static ParametersMap | getDefaultParameters (const std::string &group) |
| |
| static ParametersMap | filterParameters (const ParametersMap ¶meters, const std::string &group, bool remove=false) |
| |
|
static void | readINI (const std::string &configFile, ParametersMap ¶meters, bool modifiedOnly=false) |
| |
|
static void | readINIStr (const std::string &configContent, ParametersMap ¶meters, bool modifiedOnly=false) |
| |
|
static void | writeINI (const std::string &configFile, const ParametersMap ¶meters) |
| |
| static const std::map< std::string, std::pair< bool, std::string > > & | getRemovedParameters () |
| |
| static const ParametersMap & | getBackwardCompatibilityMap () |
| |
|
static std::string | createDefaultWorkingDirectory () |
| |
Class Parameters. This class is used to manage all custom parameters we want in the application. It was designed to be very easy to add a new parameter (just by adding one line of code). The macro PARAM(PREFIX, NAME, TYPE, DEFAULT_VALUE) is used to create a parameter in this class. A parameter can be accessed after by Parameters::defaultPARAMETERNAME() for the default value, Parameters::kPARAMETERNAME for his key (parameter name). The class provides also a general map containing all the parameter's key and default value. This map can be accessed anywhere in the application by Parameters::getDefaultParameters(); Example:
PARAM(Video, ImageWidth, int, 640);
int width = Parameters::defaultVideoImageWidth();
std::string theKey = Parameters::kVideoImageWidth();
static const ParametersMap & getDefaultParameters()
- See also
- getDefaultParameters() TODO Add a detailed example with simple classes
Definition at line 170 of file Parameters.h.