HDK
|
#include <provider_options_utils.h>
Public Member Functions | |
template<typename ValueParserType > | |
ProviderOptionsParser & | AddValueParser (const std::string &name, ValueParserType value_parser) |
template<typename ValueType > | |
ProviderOptionsParser & | AddAssignmentToReference (const std::string &name, ValueType &dest) |
template<typename EnumType > | |
ProviderOptionsParser & | AddAssignmentToEnumReference (const std::string &name, const EnumNameMapping< EnumType > &mapping, EnumType &dest) |
Status | Parse (const ProviderOptions &options) const |
Definition at line 70 of file provider_options_utils.h.
|
inline |
Adds a parser for a particular provider option value which maps an enumeration name to a value and assigns it to the given reference.
IMPORTANT: This function stores references to the mapping and destination variables. The caller must ensure that the references are valid when Parse() is called!
name | The provider option name. |
mapping | The enumeration value to name mapping. |
dest | The destination variable reference. |
Definition at line 129 of file provider_options_utils.h.
|
inline |
Adds a parser for a particular provider option value which converts a value to the right type and assigns it to the given reference.
IMPORTANT: This function stores a reference to the destination variable. The caller must ensure that the reference is valid when Parse() is called!
name | The provider option name. |
dest | The destination variable reference. |
Definition at line 105 of file provider_options_utils.h.
|
inline |
Adds a parser for a particular provider option value.
name | The provider option name. |
value_parser | An object that parses the option value. It should be callable with the following signature and return whether the parsing was successful: Status value_parser(const std::string&) |
Definition at line 84 of file provider_options_utils.h.
|
inline |
Parses the given provider options.
Definition at line 141 of file provider_options_utils.h.