Classes | Namespaces | Macros | Typedefs
Parameters.h File Reference
#include "rtabmap/core/RtabmapExp.h"
#include "rtabmap/core/Version.h"
#include <rtabmap/utilite/UConversion.h>
#include <opencv2/core/version.hpp>
#include <opencv2/opencv_modules.hpp>
#include <string>
#include <map>
Include dependency graph for Parameters.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  rtabmap::Parameters
 

Namespaces

 rtabmap
 

Macros

#define RTABMAP_PARAM(PREFIX, NAME, TYPE, DEFAULT_VALUE, DESCRIPTION)
 
#define RTABMAP_PARAM_COND(PREFIX, NAME, TYPE, COND, DEFAULT_VALUE1, DEFAULT_VALUE2, DESCRIPTION)
 
#define RTABMAP_PARAM_STR(PREFIX, NAME, DEFAULT_VALUE, DESCRIPTION)
 

Typedefs

typedef std::map< std::string, std::stringrtabmap::ParametersMap
 
typedef std::pair< std::string, std::stringrtabmap::ParametersPair
 

Macro Definition Documentation

◆ RTABMAP_PARAM

#define RTABMAP_PARAM (   PREFIX,
  NAME,
  TYPE,
  DEFAULT_VALUE,
  DESCRIPTION 
)
Value:
public: \
static std::string k##PREFIX##NAME() {return std::string(#PREFIX "/" #NAME);} \
static TYPE default##PREFIX##NAME() {return (TYPE)DEFAULT_VALUE;} \
static std::string type##PREFIX##NAME() {return std::string(#TYPE);} \
private: \
class Dummy##PREFIX##NAME { \
public: \
Dummy##PREFIX##NAME() {parameters_.insert(ParametersPair(#PREFIX "/" #NAME, #DEFAULT_VALUE)); \
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, #TYPE)); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME
std::pair< std::string, std::string > ParametersPair
Definition: Parameters.h:44
string NAME

Macro used to create parameter's key and default value. This macro must be used only in the Parameters class definition (in this file). They are automatically added to the default parameters map of the class Parameters. Example:

//for PARAM(Video, ImageWidth, int, 640), the output will be :
public:
static std::string kVideoImageWidth() {return std::string("Video/ImageWidth");}
static int defaultVideoImageWidth() {return 640;}
private:
class DummyVideoImageWidth {
public:
DummyVideoImageWidth() {parameters_.insert(ParametersPair("Video/ImageWidth", "640"));}
};
DummyVideoImageWidth dummyVideoImageWidth;

Definition at line 64 of file Parameters.h.

◆ RTABMAP_PARAM_COND

#define RTABMAP_PARAM_COND (   PREFIX,
  NAME,
  TYPE,
  COND,
  DEFAULT_VALUE1,
  DEFAULT_VALUE2,
  DESCRIPTION 
)
Value:
public: \
static std::string k##PREFIX##NAME() {return std::string(#PREFIX "/" #NAME);} \
static TYPE default##PREFIX##NAME() {return COND?DEFAULT_VALUE1:DEFAULT_VALUE2;} \
static std::string type##PREFIX##NAME() {return std::string(#TYPE);} \
private: \
class Dummy##PREFIX##NAME { \
public: \
Dummy##PREFIX##NAME() {parameters_.insert(ParametersPair(#PREFIX "/" #NAME, COND?#DEFAULT_VALUE1:#DEFAULT_VALUE2)); \
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, #TYPE)); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME
std::pair< std::string, std::string > ParametersPair
Definition: Parameters.h:44
string NAME

Macro used to create parameter's key and default value. This macro must be used only in the Parameters class definition (in this file). They are automatically added to the default parameters map of the class Parameters. Example:

//for PARAM(Video, ImageWidth, int, 640), the output will be :
public:
static std::string kVideoImageWidth() {return std::string("Video/ImageWidth");}
static int defaultVideoImageWidth() {return 640;}
private:
class DummyVideoImageWidth {
public:
DummyVideoImageWidth() {parameters_.insert(ParametersPair("Video/ImageWidth", "640"));}
};
DummyVideoImageWidth dummyVideoImageWidth;

Definition at line 131 of file Parameters.h.

◆ RTABMAP_PARAM_STR

#define RTABMAP_PARAM_STR (   PREFIX,
  NAME,
  DEFAULT_VALUE,
  DESCRIPTION 
)
Value:
public: \
static std::string k##PREFIX##NAME() {return std::string(#PREFIX "/" #NAME);} \
static std::string default##PREFIX##NAME() {return DEFAULT_VALUE;} \
static std::string type##PREFIX##NAME() {return std::string("string");} \
private: \
class Dummy##PREFIX##NAME { \
public: \
Dummy##PREFIX##NAME() {parameters_.insert(ParametersPair(#PREFIX "/" #NAME, DEFAULT_VALUE)); \
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, "string")); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME
std::pair< std::string, std::string > ParametersPair
Definition: Parameters.h:44
string NAME

It's the same as the macro PARAM but it should be used for string parameters. Macro used to create parameter's key and default value. This macro must be used only in the Parameters class definition (in this file). They are automatically added to the default parameters map of the class Parameters. Example:

//for PARAM_STR(Video, TextFileName, "Hello_world"), the output will be :
public:
static std::string kVideoFileName() {return std::string("Video/FileName");}
static std::string defaultVideoFileName() {return "Hello_world";}
private:
class DummyVideoFileName {
public:
DummyVideoFileName() {parameters_.insert(ParametersPair("Video/FileName", "Hello_world"));}
};
DummyVideoFileName dummyVideoFileName;

Definition at line 98 of file Parameters.h.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:38:58