29 #ifndef STICHWORT_PARAMETER_H_
30 #define STICHWORT_PARAMETER_H_
44 class CheckedParameter;
104 return getValue<T>();
114 template <
typename T>
117 if (!isTypeCorrect<T>())
125 template <
typename T>
138 template <
template<
class>
class F,
class Q>
158 template <
typename T>
164 template <
typename T>
201 template <
typename T>
207 template <
template<
class>
class F,
class Q>
216 template <
typename T>
256 std::stringstream ss;
257 ss <<
"The following parameters are set more than once: ";
258 for (DuplicatesList::const_iterator iter=
dups.begin(); iter!=
dups.end(); ++iter)
273 return pmap.count(name) > 0;
277 typedef ParametersMap::const_iterator MapIter;
278 for (MapIter iter = pg.
pmap.begin(); iter!=pg.
pmap.end(); ++iter)
280 if (!
pmap.count(iter->first))
282 pmap[iter->first] = iter->second;
288 ParametersMap::const_iterator it =
pmap.find(name);
289 if (it !=
pmap.end())
Parameter withDefault(T value)
bool isCondition(F< Q > cond) const
An exception type that is thrown in case of missed parameter, i.e. when some required parameter is no...
CheckedParameter checked()
friend class CheckedParameter
bool isCondition(F< Q > cond) const
static Parameter create(const std::string &name, const T &value)
Parameter(const ParameterName &pname, const T &value)
bool isInitialized() const
bool isTypeCorrect() const
std::string ParameterName
void invalidate(const std::string &reason)
std::string invalidity_reasons
An exception type that is thrown when some parameter is passed more than once.
ParameterName name() const
stichwort_internal::ValueKeeper keeper
Parameter(const Parameter &p)
bool isInitialized() const
ParametersSet operator,(const Parameter &p)
bool isTypeCorrect() const
An exception type that is thrown in case if wrong parameter value is passed.
CheckedParameter(Parameter &p)
stichwort::ParametersSet ParametersSet
bool operator==(T v) const
Parameter & satisfies(const F< Q > &cond) const
ParameterName parameter_name