The interface to access parameter values identified by name and/or (semantic) type.
Definition at line 51 of file ParameterProvider.hpp.
Public Member Functions | |
template<typename T , typename std::enable_if_t< !std::is_array< T >::value &&!std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get a non-array non-enum parameter value. More... | |
template<typename T , typename std::enable_if_t< !std::is_array< T >::value &&!std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, size_t const index, T *out) const |
Get a single non-enum parameter value from an array parameter by index. More... | |
template<typename T , typename std::enable_if_t< !std::is_array< T >::value &&!std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, std::vector< T > *out) const |
Get a vector of non-enum parameter values. More... | |
template<typename T , typename std::enable_if_t< std::is_array< T >::value &&std::rank< T >::value==1 &&!std::is_enum< std::remove_extent_t< T >>::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get a fixed-size 1 dimension array of non-enum parameter values. More... | |
template<typename T , typename std::enable_if_t< std::is_array< T >::value &&std::rank< T >::value==1 &&std::is_same< T, char8_t >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get a fixed-size 1 dimension array of non-enum parameter values of type char8_t. More... | |
template<typename T , typename std::enable_if_t< std::is_array< T >::value &&std::rank< T >::value==2 &&!std::is_enum< std::remove_all_extents_t< T >>::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get a fixed-size 2 dimension array of non-enum parameter values. More... | |
template<typename S , typename T , std::enable_if_t<!std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get a non-enum parameter value with a semantic type. More... | |
template<typename S , typename T , size_t N, std::enable_if_t< std::is_same< T, dw::core::FixedString< N >>::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, dw::core::FixedString< N > *out) const |
Get a FixedString parameter value with a semantic type. More... | |
template<typename S , typename T , std::enable_if_t< std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, T *out) const |
Get an enum parameter value with a semantic type. More... | |
template<typename S , typename T , std::enable_if_t<!std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, size_t const index, T *out) const |
Get a non-enum parameter value with a semantic type from an array parameter by index. More... | |
template<typename S , typename T , size_t N, std::enable_if_t< std::is_same< T, dw::core::FixedString< N >>::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, size_t const index, dw::core::FixedString< N > *out) const |
Get a FixedString parameter value with a semantic type from an array parameter by index. More... | |
template<typename S , typename T , std::enable_if_t< std::is_enum< T >::value > * = nullptr> | |
bool | get (dw::core::StringView const &key, size_t const index, T *out) const |
Get an enum parameter value with a semantic type from an array parameter by index. More... | |
virtual bool | get (ParameterProvider const *const parentProvider, dw::core::StringView const &key, const std::type_info &semanticTypeInfo, const std::type_info &dataTypeInfo, void *out) const =0 |
Get a parameter. More... | |
virtual bool | get (ParameterProvider const *const parentProvider, dw::core::StringView const &key, size_t const index, const std::type_info &semanticTypeInfo, const std::type_info &dataTypeInfo, void *out) const =0 |
Get a parameter value from an array parameter by index. More... | |
template<typename T > | |
bool | getOptional (dw::core::StringView const &key, T *out) const |
Convenience API throwing an exception instead of returning a failed status. More... | |
template<typename T > | |
bool | getOptional (dw::core::StringView const &key, size_t const index, T *out) const |
Convenience API throwing an exception instead of returning a failed status. More... | |
template<typename S , typename T > | |
bool | getOptional (dw::core::StringView const &key, T *out) const |
Convenience API throwing an exception instead of returning a failed status. More... | |
template<typename S , typename T > | |
bool | getOptional (dw::core::StringView const &key, size_t const index, T *out) const |
Convenience API throwing an exception instead of returning a failed status. More... | |
template<typename T > | |
void | getRequired (dw::core::StringView const &key, T *out) const |
Convenience API throwing an exception instead of returning false. More... | |
template<typename T > | |
void | getRequired (dw::core::StringView const &key, size_t const index, T *out) const |
Convenience API throwing an exception instead of returning false. More... | |
template<typename S , typename T > | |
void | getRequired (dw::core::StringView const &key, T *out) const |
Convenience API throwing an exception instead of returning false. More... | |
template<typename S , typename T > | |
void | getRequired (dw::core::StringView const &key, size_t const index, T *out) const |
Convenience API throwing an exception instead of returning false. More... | |
ParameterProvider ()=default | |
Default constructor. More... | |
virtual | ~ParameterProvider ()=default |
Destructor. More... | |
Protected Member Functions | |
ParameterProvider & | operator= (ParameterProvider const &)=default |
Copy assignment operator. More... | |
ParameterProvider & | operator= (ParameterProvider &&)=default |
Move assignment operator. More... | |
ParameterProvider (ParameterProvider const &)=default | |
Copy constructor. More... | |
ParameterProvider (ParameterProvider &&)=default | |
Move constructor. More... | |
|
protecteddefault |
Copy constructor.
|
protecteddefault |
Move constructor.
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
inline |
Get a non-array non-enum parameter value.
Definition at line 147 of file ParameterProvider.hpp.
|
inline |
Get a single non-enum parameter value from an array parameter by index.
Definition at line 162 of file ParameterProvider.hpp.
|
inline |
Get a vector of non-enum parameter values.
Definition at line 177 of file ParameterProvider.hpp.
|
inline |
Get a fixed-size 1 dimension array of non-enum parameter values.
Definition at line 193 of file ParameterProvider.hpp.
|
inline |
Get a fixed-size 1 dimension array of non-enum parameter values of type char8_t.
Definition at line 228 of file ParameterProvider.hpp.
|
inline |
Get a fixed-size 2 dimension array of non-enum parameter values.
Definition at line 257 of file ParameterProvider.hpp.
|
inline |
Get a non-enum parameter value with a semantic type.
Definition at line 372 of file ParameterProvider.hpp.
|
inline |
Get a FixedString parameter value with a semantic type.
Definition at line 395 of file ParameterProvider.hpp.
|
inline |
Get an enum parameter value with a semantic type.
The parameter value retrieved is of type string and is being mapped to the enum type output parameter.
Definition at line 421 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
|
inline |
Get a non-enum parameter value with a semantic type from an array parameter by index.
Definition at line 453 of file ParameterProvider.hpp.
|
inline |
Get a FixedString parameter value with a semantic type from an array parameter by index.
Definition at line 466 of file ParameterProvider.hpp.
|
inline |
Get an enum parameter value with a semantic type from an array parameter by index.
The parameter value retrieved is of type string and is being mapped to the enum type output parameter.
Definition at line 492 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
|
pure virtual |
Get a parameter.
[in] | parentProvider | The parent provider in case the lookup goes through a hierarchy of providers, otherwise nullptr |
[in] | key | The parameter name, or an empty string if the (semantic) type sufficiently identifies the parameter |
[in] | semanticTypeInfo | The semantic type info of the parameter, which can be different from the data type info to handle parameters with the same data type differently |
[in] | dataTypeInfo | The type info of the parameter value |
[out] | out | The parameter value is returned here if true is returned |
if | the requested parameter failed to be retrieved |
Implemented in dw::framework::TypeBasedParameterProvider.
|
pure virtual |
Get a parameter value from an array parameter by index.
[in] | parentProvider | The parent provider in case the lookup goes through a hierarchy of providers, otherwise nullptr |
[in] | key | The parameter name, or an empty string if the (semantic) type sufficiently identifies the parameter |
[in] | index | The index of the value in the array parameter |
[in] | semanticTypeInfo | The semantic type info of the parameter, which can be different from the data type info to handle parameters with the same data type differently |
[in] | dataTypeInfo | The type info of the parameter value |
[out] | out | The parameter value is returned here if true is returned |
if | the requested parameter failed to be retrieved |
Implemented in dw::framework::TypeBasedParameterProvider.
|
inline |
Convenience API throwing an exception instead of returning a failed status.
Exception | if the parameter retrieval has a failure |
Definition at line 106 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
Referenced by dw::framework::describeParameters(), and getRequired().
|
inline |
Convenience API throwing an exception instead of returning a failed status.
Exception | if the parameter retrieval has a failure |
Definition at line 125 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
|
inline |
Convenience API throwing an exception instead of returning a failed status.
Exception | if the parameter retrieval has a failure |
Definition at line 319 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
|
inline |
Convenience API throwing an exception instead of returning a failed status.
Exception | if the parameter retrieval has a failure |
Definition at line 345 of file ParameterProvider.hpp.
References dw::framework::Exception::messageStr(), and dw::framework::Exception::status().
|
inline |
Convenience API throwing an exception instead of returning false.
Exception | if the parameter is not successfully retrieved |
Definition at line 76 of file ParameterProvider.hpp.
References getOptional().
|
inline |
Convenience API throwing an exception instead of returning false.
Exception | if the parameter is not successfully retrieved |
Definition at line 91 of file ParameterProvider.hpp.
References getOptional().
|
inline |
Convenience API throwing an exception instead of returning false.
Exception | if the parameter is not successfully retrieved |
Definition at line 289 of file ParameterProvider.hpp.
|
inline |
Convenience API throwing an exception instead of returning false.
Exception | if the parameter is not successfully retrieved |
Definition at line 304 of file ParameterProvider.hpp.
|
protecteddefault |
Copy assignment operator.
|
protecteddefault |
Move assignment operator.