Classes | Namespaces | Defines | Typedefs
Parameters.h File Reference
#include "rtabmap/core/RtabmapExp.h"
#include "rtabmap/core/Version.h"
#include <rtabmap/utilite/UConversion.h>
#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

namespace  rtabmap

Defines

#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

Define 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 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;

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 62 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;

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 129 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;

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 96 of file Parameters.h.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:35