20 #ifndef ESSENTIA_CONFIGURABLE_H
21 #define ESSENTIA_CONFIGURABLE_H
48 const std::string&
name()
const {
return _name; }
53 void setName(
const std::string& name) { _name = name; }
98 return _defaultParams;
116 const std::string& range,
129 #define CONFIGURE void configure(const std::string& name1, const Parameter& value1
130 #define P(n) , const std::string& name##n, const Parameter& value##n
131 #define AP(n) params.add(name##n, value##n);
132 #define PBEG ) { ParameterMap params;
133 #define PEND configure(params); }
135 CONFIGURE PBEG
AP(1) PEND
136 CONFIGURE
P(2) PBEG
AP(1)
AP(2) PEND
137 CONFIGURE
P(2)
P(3) PBEG
AP(1)
AP(2)
AP(3) PEND
138 CONFIGURE
P(2)
P(3)
P(4) PBEG
AP(1)
AP(2)
AP(3)
AP(4) PEND
139 CONFIGURE
P(2)
P(3)
P(4)
P(5) PBEG
AP(1)
AP(2)
AP(3)
AP(4)
AP(5) PEND
142 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
144 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
146 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
148 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
150 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
P(12)
152 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
P(12)
P(13)
154 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
P(12)
P(13)
P(14)
156 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
P(12)
P(13)
P(14)
P(15)
158 CONFIGURE
P(2)
P(3)
P(4)
P(5)
P(6)
P(7)
P(8)
P(9)
P(10)
P(11)
P(12)
P(13)
P(14)
P(15)
P(16)
183 #define INHERIT(x) x, parameter(x)
186 return a->name() < b->name();
#define AP(n)
Definition: algorithmfactory.h:164
#define P(n)
Definition: algorithmfactory.h:163
Definition: configurable.h:38
const Parameter & parameter(const std::string &key) const
Definition: configurable.h:105
virtual void declareParameters()=0
DescriptionMap parameterRange
Definition: configurable.h:177
void declareParameter(const std::string &name, const std::string &desc, const std::string &range, const Parameter &defaultValue)
virtual void configure()
Definition: configurable.h:90
ParameterMap _params
Definition: configurable.h:172
virtual ~Configurable()
Definition: configurable.h:43
DescriptionMap parameterDescription
Definition: configurable.h:176
void setName(const std::string &name)
Definition: configurable.h:53
std::string _name
Definition: configurable.h:171
virtual void configure(const ParameterMap ¶ms)
const std::string & name() const
Definition: configurable.h:48
virtual void setParameters(const ParameterMap ¶ms)
ParameterMap _defaultParams
Definition: configurable.h:173
const ParameterMap & defaultParameters() const
Definition: configurable.h:97
Definition: parameter.h:276
Definition: parameter.h:30
Definition: algorithm.h:28
bool compareByName(const T *a, const T *b)
Definition: configurable.h:185