31 #if defined(Parameters_RECURSES)
32 #error Recursive header files inclusion detected in Parameters.h
35 #define Parameters_RECURSES
37 #if !defined Parameters_h
47 #include "DGtal/base/Common.h"
55 template <
typename X,
typename Y>
61 &&
"[ValueConverter<X,Y>::cast] there is no such generic type converter." );
69 static double cast(
const std::string& value )
73 std::istringstream iss( value );
82 static float cast(
const std::string& value )
86 std::istringstream iss( value );
95 static int cast(
const std::string& value )
99 std::istringstream iss( value );
105 template <
typename X >
107 static std::string
cast(
const X& value )
109 std::ostringstream ss;
126 template <
typename X>
128 template <
typename T>
176 bool count( std::string name )
const;
215 #include "DGtal/helpers/Parameters.ih"
222 #undef Parameters_RECURSES
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
ParameterValue(const Self &v)=default
void selfDisplay(std::ostream &out) const
ParameterValue(Self &&v)=default
Self & operator=(const Self &v)=default
ParameterValue(const std::string &v)
ParameterValue(const X &v)
Parameters(std::string name, ParameterValue pv=ParameterValue())
ParameterValue operator[](std::string name) const
Parameters Self
The type of *this.
Parameters(const Self &other)=default
Default copy constructor.
std::map< std::string, ParameterValue > myParameters
Self & operator()(std::string name, ParameterValue pv=ParameterValue())
Parameters(Self &&other)=default
Default move.
void selfDisplay(std::ostream &out) const
~Parameters()=default
Default destructor.
Parameters()=default
Default constructor.
bool count(std::string name) const
Self & operator()(const Self ¶ms)
Self & operator=(const Self &other)=default
Default assignment operator.
Self operator|(const Self &other) const
static std::string cast(const X &value)
static double cast(const std::string &value)
static float cast(const std::string &value)
static int cast(const std::string &value)
Generic definition of a class for converting type X toward type Y.
static Y cast(const X &)
By default, it is impossible to do such conversions.