parameter.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Pub
lic License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_core_parameters_hh
#define mia_core_parameters_hh
#include <string>
#include <map>
#include <ostream>
#include <istream>
#include <sstream>
#include <memory>
#include <mia/core/flags.hh>
#include <mia/core/dictmap.hh>
#include <mia/core/msgstream.hh>
#include <mia/core/handlerbase.hh>
#include <mia/core/factory_trait.hh>
#include <mia/core/cmdoptionflags.hh>
NS_MIA_BEGIN
class EXPORT_CORE CParameter
{
public:
CParameter(const char type[], bool required, const char *descr);
virtual ~CParameter();
const char *type() const;
void descr(std::ostream& os) const;
std::string get_value_as_string() const;
void value(std::ostream& os) const;
bool required_set() const;
bool set(const std::string& str_value);
const char *get_descr() const;
void reset();
void add_dependend_handler(HandlerHelpMap& handler_map) const;
std::string get_default_value() const;
void get_help_xml(CXMLElement& root) const;
virtual void post_set();
protected:
virtual void do_descr(std::ostream& os) const = 0;
const std::string errmsg(const std::string& err_value) const;
CXMLElement& add_xmlhelp_childnode(CXMLElement& parent, const std::string& tag) const;
void add_xmlhelp_attribute(CXMLElement& node, const std::string& tag, const std::string& value)const;
void add_xmlhelp_text(CXMLElement& node, const std::string& value)const;
private:
virtual void do_add_dependend_handler(HandlerHelpMap& handler_map) const;
virtual bool do_set(const std::string& str_value) = 0;
virtual void do_reset() = 0;
virtual std::string do_get_default_value() const = 0;
virtual std::string do_get_value_as_string() const = 0;
virtual void do_get_help_xml(CXMLElement& self) const;
bool m_required;
bool m_is_required;
const std::string m_type;
const char *m_descr;
};
template <typename T>
class EXPORT_CORE CTParameter : public CParameter
{
public:
CTParameter(T& value, bool required, const char *descr);
protected:
virtual void do_descr(std::ostream& os) const;
private:
virtual bool do_set(const std::string& str_value);
virtual void do_reset();
virtual void adjust(T& value);
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
T& m_value;
const T m_default_value;
};
enum class EParameterBounds : int {
bf_none = 0,
bf_min = 1,
bf_min_open = 3,
bf_min_closed = 5,
bf_min_flags = 7,
bf_max = 0x10,
bf_max_open = 0x30,
bf_max_closed = 0x50,
bf_max_flags = 0x70,
bf_closed_interval = 0x55,
bf_open_interval = 0x33
};
IMPLEMENT_FLAG_OPERATIONS(EParameterBounds);
EXPORT_CORE std::ostream& operator << (std::ostream& os, EParameterBounds flags);
template <typename T>
class EXPORT_CORE TBoundedParameter : public CTParameter<T>
{
public:
template <typename S>
struct boundary {
typedef S value_type;
};
template <typename S>
struct boundary<std::vector<S>> {
typedef S value_type;
};
typedef typename boundary<T>::value_type boundary_type;
TBoundedParameter(T& value, EParameterBounds flags, const std::vector<boundary_type>& boundaries,
bool required, const char *descr);
protected:
void do_descr(std::ostream& os) const;
private:
virtual void adjust(T& value);
virtual void do_get_help_xml(CXMLElement& self) const;
boundary_type m_min;
boundary_type m_max;
EParameterBounds m_flags;
};
template <typename T>
CParameter *make_param(T& value, bool required, const char *descr)
{
return new CTParameter<T>(value, required, descr);
}
template <typename T, typename S>
CParameter *make_lo_param(T& value, S lower_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_open,
{static_cast<T>(lower_bound)}, required, descr);
}
template <typename T>
CParameter *make_positive_param(T& value, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_open, {T()}, required, descr);
}
template <typename T, typename S>
CParameter *make_lc_param(T& value, S lower_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_closed,
{static_cast<T>(lower_bound)}, required, descr);
}
template <typename T>
CParameter *make_nonnegative_param(T& value, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_closed, {T()}, required, descr);
}
template <typename T, typename S>
CParameter *make_uo_param(T& value, S upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_open,
{static_cast<T>(upper_bound)}, required, descr);
}
template <typename T, typename S>
CParameter *make_uc_param(T& value, S upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_closed,
{static_cast<T>(upper_bound)}, required, descr);
}
template <typename T, typename S1, typename S2>
CParameter *make_ci_param(T& value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_closed_interval,
{static_cast<T>(lower_bound), static_cast<T>(upper_bound)}, required, descr);
}
template <typename T, typename S1, typename S2>
CParameter *make_oi_param(T& value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_open_interval,
{static_cast<T>(lower_bound), static_cast<T>(upper_bound)}, required, descr);
}
template <typename T, typename S1, typename S2>
CParameter *make_coi_param(T& value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_min_closed | EParameterBounds::bf_max_open,
{static_cast<T>(lower_bound), static_cast<T>(upper_bound)}, required, descr);
}
template <typename T, typename S1, typename S2>
CParameter *make_oci_param(T& value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
{
return new TBoundedParameter<T>(value, EParameterBounds::bf_max_closed | EParameterBounds::bf_min_open,
{static_cast<T>(lower_bound), static_cast<T>(upper_bound)}, required, descr);
}
template <typename T>
class CDictParameter : public CParameter
{
public:
CDictParameter(T& value, const TDictMap<T>& dict, const char *descr, bool required = false);
protected:
virtual void do_descr(std::ostream& os) const;
private:
virtual bool do_set(const std::string& str_value);
virtual void do_reset();
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
virtual void do_get_help_xml(CXMLElement& self) const;
T& m_value;
T m_default_value;
const TDictMap<T> m_dict;
};
template <typename F>
class TFactoryParameter : public CParameter
{
public:
TFactoryParameter(typename F::ProductPtr& value, const std::string& init, bool required, const char *descr);
TFactoryParameter(typename F::UniqueProduct& value, const std::string& init, bool required, const char *descr);
private:
virtual void do_descr(std::ostream& os) const;
virtual void do_add_dependend_handler(HandlerHelpMap& handler_map)const;
virtual bool do_set(const std::string& str_value);
virtual void do_reset();
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
virtual void do_get_help_xml(CXMLElement& self) const;
typename F::ProductPtr dummy_shared_value;
typename F::UniqueProduct dummy_unique_value;
typename F::ProductPtr& m_shared_value;
typename F::UniqueProduct& m_unique_value;
virtual void post_set();
std::string m_string_value;
std::string m_default_value;
bool m_unique;
};
template <typename T>
class CSetParameter : public CParameter
{
public:
CSetParameter(T& value, const std::set<T>& valid_set, const char *descr, bool required = false);
protected:
virtual void do_descr(std::ostream& os) const;
private:
virtual bool do_set(const std::string& str_value);
virtual void do_reset();
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
void do_get_help_xml(CXMLElement& self) const;
T& m_value;
T m_default_value;
const std::set<T> m_valid_set;
};
template <typename T>
class TParameter : public CParameter
{
public:
TParameter(T& value, bool required, const char *descr);
protected:
virtual void do_descr(std::ostream& os) const;
private:
virtual void do_reset();
virtual bool do_set(const std::string& str_value);
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
T& m_value;
T m_default_value;
};
class EXPORT_CORE CStringParameter: public CParameter
{
public:
CStringParameter(std::string& value, CCmdOptionFlags flags, const char *descr,
const CPluginHandlerBase *plugin_hint = nullptr);
private:
virtual void do_reset();
virtual bool do_set(const std::string& str_value);
virtual std::string do_get_default_value() const;
virtual std::string do_get_value_as_string() const;
virtual void do_descr(std::ostream& os) const;
virtual void do_get_help_xml(CXMLElement& self) const;
virtual void do_add_dependend_handler(HandlerHelpMap& handler_map)const;
std::string& m_value;
std::string m_default_value;
CCmdOptionFlags m_flags;
const CPluginHandlerBase *m_plugin_hint;
};
typedef CTParameter<bool> CBoolParameter;
typedef TBoundedParameter<uint16_t> CUSBoundedParameter;
typedef TBoundedParameter<uint32_t> CUIBoundedParameter;
typedef TBoundedParameter<uint64_t> CULBoundedParameter;
typedef TBoundedParameter<int16_t> CSSBoundedParameter;
typedef TBoundedParameter<int32_t> CSIBoundedParameter;
typedef TBoundedParameter<int64_t> CSLBoundedParameter;
typedef TBoundedParameter<float> CFBoundedParameter;
typedef TBoundedParameter<double> CDBoundedParameter;
typedef TBoundedParameter<std::vector<uint16_t>> CVUSBoundedParameter;
typedef TBoundedParameter<std::vector<uint32_t>> CVUIBoundedParameter;
typedef TBoundedParameter<std::vector<uint64_t>> CVULBoundedParameter;
typedef TBoundedParameter<std::vector<int16_t>> CVSSBoundedParameter;
typedef TBoundedParameter<std::vector<int32_t>> CVSIBoundedParameter;
typedef TBoundedParameter<std::vector<int64_t>> CVSLBoundedParameter;
typedef TBoundedParameter<std::vector<float>> CVFBoundedParameter;
typedef TBoundedParameter<std::vector<double>> CVDBoundedParameter;
template <typename T>
CParameter *make_param(std::shared_ptr<T>& value, const std::string& init, bool required, const char *descr)
{
typedef typename FactoryTrait<T>::type F;
return new TFactoryParameter<F>(value, init, required, descr);
}
template <typename T>
CParameter *make_param(std::unique_ptr<T>& value, const std::string& init, bool required, const char *descr)
{
typedef typename FactoryTrait<T>::type F;
return new TFactoryParameter<F>(value, init, required, descr);
}
template <typename T>
struct __dispatch_param_translate {
static std::string apply(T x)
{
std::ostringstream s;
s << x;
return s.str();
}
};
template <>
struct __dispatch_param_translate<std::string> {
static std::string apply(const std::string& x)
{
return x;
}
};
template <>
struct __dispatch_param_translate<const char *> {
static std::string apply(const char *x)
{
return std::string(x);
}
};
template <typename T>
CDictParameter<T>::CDictParameter(T& value, const TDictMap<T>& dict, const char *descr, bool required):
CParameter("dict", required, descr),
m_value(value),
m_default_value(value),
m_dict(dict)
{
}
template <typename T>
void CDictParameter<T>::do_descr(std::ostream& os) const
{
for (auto i = m_dict.get_help_begin(); i != m_dict.get_help_end(); ++i) {
os << "\n " << i->second.first << ": " << i->second.second;
}
}
template <typename T>
void CDictParameter<T>::do_get_help_xml(CXMLElement& self) const
{
TRACE_FUNCTION;
auto& dict = this->add_xmlhelp_childnode(self, "dict");
for (auto i = m_dict.get_help_begin(); i != m_dict.get_help_end(); ++i) {
auto& v = this->add_xmlhelp_childnode(dict, "value");
this->add_xmlhelp_attribute(v, "name", i->second.first);
this->add_xmlhelp_text(v, i->second.second);
}
}
template <typename T>
bool CDictParameter<T>::do_set(const std::string& str_value)
{
m_value = m_dict.get_value(str_value.c_str());
return true;
}
template <typename T>
void CDictParameter<T>::do_reset()
{
m_value = m_default_value;
}
template <typename T>
std::string CDictParameter<T>::do_get_default_value() const
{
return m_dict.get_name(m_default_value);
}
template <typename T>
std::string CDictParameter<T>::do_get_value_as_string() const
{
return m_dict.get_name(m_value);
}
template <typename F>
TFactoryParameter<F>::TFactoryParameter(typename F::ProductPtr& value,
const std::string& init, bool required, const char *descr):
CParameter("factory", required, descr),
m_shared_value(value),
m_unique_value(dummy_unique_value),
m_string_value(init),
m_default_value(init),
m_unique(false)
{
}
template <typename F>
TFactoryParameter<F>::TFactoryParameter(typename F::UniqueProduct& value, const std::string& init, bool required, const char *descr):
CParameter("factory", required, descr),
m_shared_value(dummy_shared_value),
m_unique_value(value),
m_string_value(init),
m_default_value(init),
m_unique(true)
{
}
template <typename T>
void TFactoryParameter<T>::do_descr(std::ostream& os) const
{
os << "For a list of available plug-ins see run 'mia-plugin-help "
<< T::instance().get_descriptor() << "'";
}
template <typename T>
void TFactoryParameter<T>::do_get_help_xml(CXMLElement& self) const
{
auto& node = this->add_xmlhelp_childnode(self, "factory");
this->add_xmlhelp_attribute(node, "name", T::instance().get_descriptor());
}
template <typename T>
bool TFactoryParameter<T>::do_set(const std::string& str_value)
{
m_string_value = str_value;
return true;
}
template <typename T>
void TFactoryParameter<T>::post_set()
{
if (!m_string_value.empty()) {
if (m_unique)
m_unique_value = T::instance().produce_unique(m_string_value);
else
m_shared_value = T::instance().produce(m_string_value);
}
}
template <typename T>
void TFactoryParameter<T>::do_reset()
{
m_string_value = m_default_value;
}
template <typename T>
void TFactoryParameter<T>::do_add_dependend_handler(HandlerHelpMap& handler_map)const
{
// add recursively all dependent handlers
if (handler_map.find(T::instance().get_descriptor()) == handler_map.end()) {
handler_map[T::instance().get_descriptor()] = &T::instance();
for (auto i = T::instance().begin(); i != T::instance().end(); ++i)
i->second->add_dependend_handlers(handler_map);
}
}
template <typename T>
std::string TFactoryParameter<T>::do_get_default_value() const
{
return m_default_value;
}
template <typename T>
std::string TFactoryParameter<T>::do_get_value_as_string() const
{
if (m_unique && m_unique_value)
return m_unique_value->get_init_string();
if (!m_unique && m_shared_value)
return m_shared_value->get_init_string();
return m_string_value;
}
template <typename T>
CSetParameter<T>::CSetParameter(T& value, const std::set<T>& valid_set, const char *descr, bool required):
CParameter("set", required, descr),
m_value(value),
m_default_value(value),
m_valid_set(valid_set)
{
if (m_valid_set.empty())
throw std::invalid_argument("CSetParameter initialized with empty set");
}
template <typename T>
std::string CSetParameter<T>::do_get_default_value() const
{
return __dispatch_param_translate<T>::apply(m_default_value);
}
template <typename T>
std::string CSetParameter<T>::do_get_value_as_string() const
{
return __dispatch_param_translate<T>::apply(m_value);
}
template <typename T>
void CSetParameter<T>::do_descr(std::ostream& os) const
{
auto i = m_valid_set.begin();
auto e = m_valid_set.end();
assert ( i != e );
os << " Supported values are (" << *i;
++i;
while (i != e)
os << '|' << *i++;
os << ')';
}
template <typename T>
void CSetParameter<T>::do_get_help_xml(CXMLElement& self) const
{
auto& node = this->add_xmlhelp_childnode(self, "set");
for (auto i = m_valid_set.begin(); i != m_valid_set.end(); ++i) {
auto& v = this->add_xmlhelp_childnode(node, "value");
this->add_xmlhelp_attribute(v, "name", __dispatch_param_translate<T>::apply(*i));
}
}
template <typename T>
void CSetParameter<T>::do_reset()
{
m_value = m_default_value;
}
template <typename T>
bool CSetParameter<T>::do_set(const std::string& str_value)
{
std::stringstream s(str_value);
T val;
s >> val;
if (s.fail() || m_valid_set.find(val) == m_valid_set.end()) {
throw std::invalid_argument(errmsg(str_value));
}
m_value = val;
return true;
}
template <typename T>
TParameter<T>::TParameter(T& value, bool required, const char *descr):
CParameter("streamable", required, descr),
m_value(value),
m_default_value(value)
{
}
template <typename T>
void TParameter<T>::do_descr(std::ostream& os) const
{
os << m_value;
}
template <typename T>
bool TParameter<T>::do_set(const std::string& str_value)
{
std::stringstream s(str_value);
s >> m_value;
if (s.fail())
throw std::invalid_argument(errmsg(str_value));
return true;
}
template <typename T>
void TParameter<T>::do_reset()
{
m_value = m_default_value;
}
template <typename T>
std::string TParameter<T>::do_get_default_value() const
{
std::ostringstream s;
s << m_default_value;
auto str = s.str();
if (str.find(',') != std::string::npos) {
std::ostringstream s2;
s2 << '[' << str << ']';
str = s2.str();
}
return str;
}
template <typename T>
std::string TParameter<T>::do_get_value_as_string() const
{
return __dispatch_param_translate<T>::apply(m_value);
}
extern template class EXPORT_CORE TBoundedParameter<uint16_t>;
extern template class EXPORT_CORE TBoundedParameter<uint32_t>;
extern template class EXPORT_CORE TBoundedParameter<uint64_t>;
extern template class EXPORT_CORE TBoundedParameter<int16_t>;
extern template class EXPORT_CORE TBoundedParameter<int32_t>;
extern template class EXPORT_CORE TBoundedParameter<int64_t>;
extern template class EXPORT_CORE TBoundedParameter<float>;
extern template class EXPORT_CORE TBoundedParameter<double>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<uint16_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<uint32_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<uint64_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<int16_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<int32_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<int64_t>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<float>>;
extern template class EXPORT_CORE TBoundedParameter<std::vector<double>>;
extern template class EXPORT_CORE CTParameter<std::vector<std::string>>;
extern template class EXPORT_CORE CTParameter<std::string>;
extern template class EXPORT_CORE CTParameter<bool>;
NS_MIA_END
#endif
CDictParameter::CDictParameter
CDictParameter(T &value, const TDictMap< T > &dict, const char *descr, bool required=false)
Definition parameter.hh:683
CDictParameter::do_descr
virtual void do_descr(std::ostream &os) const
Definition parameter.hh:692
CParameter
The base class for parameters used in complex options.
Definition parameter.hh:49
CParameter::set
bool set(const std::string &str_value)
CParameter::type
const char * type() const
CParameter::descr
void descr(std::ostream &os) const
CParameter::get_descr
const char * get_descr() const
CParameter::get_default_value
std::string get_default_value() const
CParameter::post_set
virtual void post_set()
CParameter::get_help_xml
void get_help_xml(CXMLElement &root) const
CParameter::CParameter
CParameter(const char type[], bool required, const char *descr)
CParameter::get_value_as_string
std::string get_value_as_string() const
CParameter::add_dependend_handler
void add_dependend_handler(HandlerHelpMap &handler_map) const
CParameter::errmsg
const std::string errmsg(const std::string &err_value) const
create an error message by using the given value that raises the error
CParameter::add_xmlhelp_attribute
void add_xmlhelp_attribute(CXMLElement &node, const std::string &tag, const std::string &value) const
CParameter::add_xmlhelp_text
void add_xmlhelp_text(CXMLElement &node, const std::string &value) const
CParameter::reset
void reset()
CParameter::add_xmlhelp_childnode
CXMLElement & add_xmlhelp_childnode(CXMLElement &parent, const std::string &tag) const
CParameter::~CParameter
virtual ~CParameter()
CParameter::value
void value(std::ostream &os) const
CParameter::required_set
bool required_set() const
CParameter::do_descr
virtual void do_descr(std::ostream &os) const =0
CPluginHandlerBase
The base class for all plugin handlers.
Definition handlerbase.hh:57
CSetParameter::CSetParameter
CSetParameter(T &value, const std::set< T > &valid_set, const char *descr, bool required=false)
Definition parameter.hh:831
CSetParameter::do_descr
virtual void do_descr(std::ostream &os) const
Definition parameter.hh:855
CStringParameter::CStringParameter
CStringParameter(std::string &value, CCmdOptionFlags flags, const char *descr, const CPluginHandlerBase *plugin_hint=nullptr)
CTParameter
Generic type of a complex paramter.
Definition parameter.hh:171
CTParameter::CTParameter
CTParameter(T &value, bool required, const char *descr)
CTParameter::do_descr
virtual void do_descr(std::ostream &os) const
CXMLElement
This class implements a facade for the xml Element.
Definition xmlinterface.hh:50
TBoundedParameter
Definition parameter.hh:237
TBoundedParameter::do_descr
void do_descr(std::ostream &os) const
TBoundedParameter::TBoundedParameter
TBoundedParameter(T &value, EParameterBounds flags, const std::vector< boundary_type > &boundaries, bool required, const char *descr)
TBoundedParameter::boundary_type
boundary< T >::value_type boundary_type
Definition parameter.hh:250
TDictMap
A mapper from emums to string values. - usefull for names flags.
Definition dictmap.hh:46
TFactoryParameter
A parameter that get's initialized by a factory to a shared or unique pointer.
Definition parameter.hh:406
TFactoryParameter::TFactoryParameter
TFactoryParameter(typename F::ProductPtr &value, const std::string &init, bool required, const char *descr)
Definition parameter.hh:738
TParameter::do_descr
virtual void do_descr(std::ostream &os) const
Definition parameter.hh:914
TParameter::TParameter
TParameter(T &value, bool required, const char *descr)
Definition parameter.hh:904
cmdoptionflags.hh
CCmdOptionFlags
CCmdOptionFlags
Definition cmdoptionflags.hh:28
CCmdOptionFlags::required
@ required
Definition cmdoptionflags.hh:30
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
dictmap.hh
factory_trait.hh
flags.hh
IMPLEMENT_FLAG_OPERATIONS
#define IMPLEMENT_FLAG_OPERATIONS(E)
Definition flags.hh:36
EParameterBounds
EParameterBounds
Scalar parameter with an expected value range.
Definition parameter.hh:216
EParameterBounds::bf_max_open
@ bf_max_open
Definition parameter.hh:223
EParameterBounds::bf_closed_interval
@ bf_closed_interval
Definition parameter.hh:226
EParameterBounds::bf_none
@ bf_none
Definition parameter.hh:217
EParameterBounds::bf_min_flags
@ bf_min_flags
Definition parameter.hh:221
EParameterBounds::bf_min_closed
@ bf_min_closed
Definition parameter.hh:220
EParameterBounds::bf_min
@ bf_min
Definition parameter.hh:218
EParameterBounds::bf_open_interval
@ bf_open_interval
Definition parameter.hh:227
EParameterBounds::bf_max
@ bf_max
Definition parameter.hh:222
EParameterBounds::bf_max_closed
@ bf_max_closed
Definition parameter.hh:224
EParameterBounds::bf_max_flags
@ bf_max_flags
Definition parameter.hh:225
EParameterBounds::bf_min_open
@ bf_min_open
Definition parameter.hh:219
HandlerHelpMap
std::map< std::string, const CPluginHandlerBase * > HandlerHelpMap
A map that is used to collect the plug-in handlers used in a program.
Definition handlerbase.hh:45
handlerbase.hh
msgstream.hh
TRACE_FUNCTION
#define TRACE_FUNCTION
Definition msgstream.hh:209
std
Definition gsl_iterator.hh:324
CUSBoundedParameter
TBoundedParameter< uint16_t > CUSBoundedParameter
an unsigned short parameter (with possible boundaries)
Definition parameter.hh:565
CUIBoundedParameter
TBoundedParameter< uint32_t > CUIBoundedParameter
an unsigned int parameter (with possible boundaries)
Definition parameter.hh:567
CSIBoundedParameter
TBoundedParameter< int32_t > CSIBoundedParameter
an signed int parameter (with possible boundaries)
Definition parameter.hh:574
make_positive_param
CParameter * make_positive_param(T &value, bool required, const char *descr)
Definition parameter.hh:294
CVDBoundedParameter
TBoundedParameter< std::vector< double > > CVDBoundedParameter
an float parameter, double accuracy (with possible boundaries)
Definition parameter.hh:600
make_uc_param
CParameter * make_uc_param(T &value, S upper_bound, bool required, const char *descr)
Definition parameter.hh:322
make_oci_param
CParameter * make_oci_param(T &value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
Definition parameter.hh:350
operator<<
EXPORT_CORE std::ostream & operator<<(std::ostream &os, EParameterBounds flags)
CULBoundedParameter
TBoundedParameter< uint64_t > CULBoundedParameter
an unsigned long parameter (with possible boundaries)
Definition parameter.hh:569
CSSBoundedParameter
TBoundedParameter< int16_t > CSSBoundedParameter
an signed short parameter (with possible boundaries)
Definition parameter.hh:572
CVUSBoundedParameter
TBoundedParameter< std::vector< uint16_t > > CVUSBoundedParameter
an unsigned short parameter (with possible boundaries)
Definition parameter.hh:584
CVSLBoundedParameter
TBoundedParameter< std::vector< int64_t > > CVSLBoundedParameter
an signed long parameter (with possible boundaries)
Definition parameter.hh:595
make_ci_param
CParameter * make_ci_param(T &value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
Definition parameter.hh:329
CDBoundedParameter
TBoundedParameter< double > CDBoundedParameter
an float parameter, double accuracy (with possible boundaries)
Definition parameter.hh:581
make_nonnegative_param
CParameter * make_nonnegative_param(T &value, bool required, const char *descr)
Definition parameter.hh:308
make_coi_param
CParameter * make_coi_param(T &value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
Definition parameter.hh:343
make_uo_param
CParameter * make_uo_param(T &value, S upper_bound, bool required, const char *descr)
Definition parameter.hh:315
CVUIBoundedParameter
TBoundedParameter< std::vector< uint32_t > > CVUIBoundedParameter
an unsigned int parameter (with possible boundaries)
Definition parameter.hh:586
CVFBoundedParameter
TBoundedParameter< std::vector< float > > CVFBoundedParameter
an float parameter, single accuracy (with possible boundaries)
Definition parameter.hh:598
CBoolParameter
CTParameter< bool > CBoolParameter
boolean parameter
Definition parameter.hh:561
CVULBoundedParameter
TBoundedParameter< std::vector< uint64_t > > CVULBoundedParameter
an unsigned long parameter (with possible boundaries)
Definition parameter.hh:588
make_param
CParameter * make_param(T &value, bool required, const char *descr)
Definition parameter.hh:280
CVSSBoundedParameter
TBoundedParameter< std::vector< int16_t > > CVSSBoundedParameter
an signed short parameter (with possible boundaries)
Definition parameter.hh:591
CFBoundedParameter
TBoundedParameter< float > CFBoundedParameter
an float parameter, single accuracy (with possible boundaries)
Definition parameter.hh:579
CVSIBoundedParameter
TBoundedParameter< std::vector< int32_t > > CVSIBoundedParameter
an signed int parameter (with possible boundaries)
Definition parameter.hh:593
make_lo_param
CParameter * make_lo_param(T &value, S lower_bound, bool required, const char *descr)
Definition parameter.hh:287
CSLBoundedParameter
TBoundedParameter< int64_t > CSLBoundedParameter
an signed long parameter (with possible boundaries)
Definition parameter.hh:576
make_lc_param
CParameter * make_lc_param(T &value, S lower_bound, bool required, const char *descr)
Definition parameter.hh:300
make_oi_param
CParameter * make_oi_param(T &value, S1 lower_bound, S2 upper_bound, bool required, const char *descr)
Definition parameter.hh:336
TBoundedParameter::boundary< std::vector< S > >::value_type
S value_type
Definition parameter.hh:247
TBoundedParameter::boundary
Definition parameter.hh:241
TBoundedParameter::boundary::value_type
S value_type
Definition parameter.hh:242