10 #ifndef CONFIGURABLE_H_ 11 #define CONFIGURABLE_H_ 38 template <
typename T>
bool SetParameter(
const std::string &name,
const T &value);
50 bool SetParameter(
const std::string &name,
const char *value);
68 template <
typename T>
bool DefineParameter(
const std::string &name, T &variable);
79 std::shared_ptr<Representation>
_repr;
96 static_assert(!(std::is_array<T>::value),
"Can't use array as parameter");
97 static_assert(!(std::is_same<T, const char *>::value),
"Can't use const char * as parameter; use std::string");
Configurable(const std::shared_ptr< Representation > &impl)
Definition: Configurable.h:75
Class describing a pointer to an object retrieved from an ObjectMap.
Definition: ObjPtr.h:31
bool SetParameter(const std::string &name, const T &value)
Set the value of a parameter.
Definition: Configurable.h:84
std::shared_ptr< Representation > _repr
Definition: Configurable.h:79
bool DefineParameter(const std::string &name, T &variable)
Set a parameter.
Definition: Configurable.h:94
A smart pointer not owning the wrapped object.
Definition: ObserverPtr.h:28
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
Definition: Configurable.h:70
A map between strings and objects of ObjectWrapper kind.
Definition: ObjectMap.h:32
Configurable()
Constructor.
Definition: Configurable.cpp:14
std::vector< std::string > GetParameters()
Get the names of the parameters.
Definition: Configurable.cpp:26
ObjectMap paramsMap
Definition: Configurable.h:72
Interface for a configurable class.
Definition: Configurable.h:25
std::shared_ptr< Representation > & GetRepresentation()
Definition: Configurable.h:76