#include "rtabmap/core/rtabmap_core_export.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>
Go to the source code of this file.
|
#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) |
|
◆ 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)); \
descriptions_.insert(
ParametersPair(#PREFIX
"/" #NAME, DESCRIPTION));} \
}; \
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:
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)); \
descriptions_.insert(
ParametersPair(#PREFIX
"/" #NAME, DESCRIPTION));} \
}; \
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:
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));} \
}; \
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:
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.