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>
58 static Y
cast(
const X& value )
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 ClosedIntegerHalfPlane< TSpace > &object)
Self & operator=(const Self &v)=default
ParameterValue(const Self &v)=default
void selfDisplay(std::ostream &out) const
ParameterValue(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.
Self & operator=(const Self &other)=default
Default assignment operator.
std::map< std::string, ParameterValue > myParameters
Parameters(Self &&other)=default
Default move.
Self & operator()(std::string name, ParameterValue pv=ParameterValue())
void selfDisplay(std::ostream &out) const
~Parameters()=default
Default destructor.
Self & operator()(const Self ¶ms)
Parameters()=default
Default constructor.
bool count(std::string name) const
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 &value)
By default, it is impossible to do such conversions.