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::string > rtabmap::ParametersMap
 
typedef std::pair< std::string, std::string > rtabmap::ParametersPair
 

Macro Definition Documentation

#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:

1 //for PARAM(Video, ImageWidth, int, 640), the output will be :
2 public:
3  static std::string kVideoImageWidth() {return std::string("Video/ImageWidth");}
4  static int defaultVideoImageWidth() {return 640;}
5 private:
6  class DummyVideoImageWidth {
7  public:
8  DummyVideoImageWidth() {parameters_.insert(ParametersPair("Video/ImageWidth", "640"));}
9  };
10  DummyVideoImageWidth dummyVideoImageWidth;

Definition at line 64 of file Parameters.h.

#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:

1 //for PARAM(Video, ImageWidth, int, 640), the output will be :
2 public:
3  static std::string kVideoImageWidth() {return std::string("Video/ImageWidth");}
4  static int defaultVideoImageWidth() {return 640;}
5 private:
6  class DummyVideoImageWidth {
7  public:
8  DummyVideoImageWidth() {parameters_.insert(ParametersPair("Video/ImageWidth", "640"));}
9  };
10  DummyVideoImageWidth dummyVideoImageWidth;

Definition at line 131 of file Parameters.h.

#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:

1 //for PARAM_STR(Video, TextFileName, "Hello_world"), the output will be :
2 public:
3  static std::string kVideoFileName() {return std::string("Video/FileName");}
4  static std::string defaultVideoFileName() {return "Hello_world";}
5 private:
6  class DummyVideoFileName {
7  public:
8  DummyVideoFileName() {parameters_.insert(ParametersPair("Video/FileName", "Hello_world"));}
9  };
10  DummyVideoFileName dummyVideoFileName;

Definition at line 98 of file Parameters.h.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:07