|
| template<class Tag > |
| ParameterTagTraits< Tag >::Type & | get () |
| | get value of a parameter More...
|
| |
| template<class Tag > |
| const ParameterTagTraits< Tag >::Type & | get () const |
| | get value of a parameter More...
|
| |
| bool | operator!= (const ParameterSet &b) const |
| |
| bool | operator== (const ParameterSet &b) const |
| |
| template<class Dummy = void, class = std::enable_if_t< details::AllOf<has_get_default_member_function, ParameterTagTraits<Tags>...>::value, Dummy>> |
| | ParameterSet () |
| | default initializing constructor Initializes each parameter using either the get_default function defined in the parameter tag or the default constructor. More...
|
| |
| template<class Dummy = void, class = std::enable_if_t<details::AllOf<std::is_default_constructible, typename Tags::Type...>::value, Dummy>> |
| | ParameterSet (NoDefaultInit) |
| | Non-initializing default constructor. More...
|
| |
| template<class T1 , class... TN, class = std::enable_if_t< !std::is_same_v<std::decay_t<T1>, ParameterSet> && details::AllOf<details::BindTail<has_get_default_member_function, T1, TN...>::template type, ParameterTagTraits<Tags>...>::value>> |
| | ParameterSet (T1 &&arg1, TN &&... argn) |
| | default initializing constructor. More...
|
| |
| template<class IOContext > |
| void | serialize (IOContext &io) const |
| | serialize this. More...
|
| |
| template<class Tag > |
| void | set (const typename ParameterTagTraits< Tag >::Type &value) |
| | set value of a parameter More...
|
| |
| template<class Tag , class T > |
| void | set (T &&arg) |
| | set value of a parameter More...
|
| |
| template<class Tag , class... T> |
| std::enable_if_t< has_get_default_member_function< ParameterTagTraits< Tag >, T... >::value, void > | set_default (T &&... ts) |
| | (re)set parameter to its default value More...
|
| |
|
| template<class IOContext , class IOObject , class... Rs, std::enable_if_t<(sizeof...(Rs)==sizeof...(Tags)), void * > = nullptr> |
| static IOResult< ParameterSet > | deserialize_recursive (IOContext &io, IOObject &, Rs &&... rs) |
| |
| template<class IOContext , class IOObject , class... Rs, std::enable_if_t<(sizeof...(Rs)< sizeof...(Tags)), void * > = nullptr> |
| static IOResult< ParameterSet > | deserialize_recursive (IOContext &io, IOObject &obj, Rs &&... rs) |
| |
template<class... Tags>
class mio::ParameterSet< Tags >
a set of parameters defined at compile time
parameters added as template parameters (tags)
example:
struct FooParamTag { using type = X; ... };
ParameterSet<FooParamTag>
- Template Parameters
-
| Tags | All parameter types contained in this set. The types should be unique. |
template<class... Tags>
template<class Dummy = void, class = std::enable_if_t<details::AllOf<std::is_default_constructible, typename Tags::Type...>::value, Dummy>>
Non-initializing default constructor.
This constructor exists if all parameters are default constructible and it can be used by calling the constructor with an empty object NoDefaultInit. It serves in cases where the get_default() functions of the parameters are very costly and should not be called as parameters will set not non-default values anyway.
template<class... Tags>
template<class Dummy = void, class = std::enable_if_t< details::AllOf<has_get_default_member_function, ParameterTagTraits<Tags>...>::value, Dummy>>
default initializing constructor Initializes each parameter using either the get_default function defined in the parameter tag or the default constructor.
this constructor exists if all parameters have get_default() without arguments or a default constructor.
template<class... Tags>
template<class T1 , class... TN, class = std::enable_if_t< !std::is_same_v<std::decay_t<T1>, ParameterSet> && details::AllOf<details::BindTail<has_get_default_member_function, T1, TN...>::template type, ParameterTagTraits<Tags>...>::value>>
default initializing constructor.
Initializes each parameter using either the get_default function defined in the parameter tag or the default constructor. this constructor exists if all parameters have get_default(args...) with the same number of arguments or a default constructor. Arguments get forwarded to get_default of parameters.
- Template Parameters
-
| T1 | First argument of get_default(...) function called on the parameters, e.g., T1=AgeGroup&. |
| TN | Further arguments passed to get_default(...) functions. |