#include <eckit/option/FactoryOption.h>
template<class T>
FactoryOption class
Base classes
-
template<class T>class BaseOption<std::string>
Public types
-
using base_t = BaseOption<std::
string> -
using args_t = std::
vector<std:: string>
Public static functions
-
template<typename T>static void copy(const std::
string& name, const Configuration& from, Configured& to)
Constructors, destructors, conversion operators
-
FactoryOption(const std::
string& name, const std:: string& description) -
FactoryOption(const std::
string& name, const std:: string& description, std:: string default_value) - ~FactoryOption() defaulted override
Public functions
- auto set(Configured& param, size_t values, args_t::const_iterator begin, args_t::const_iterator end) const -> size_t override
-
auto defaultValue(const std::
string& value) -> Option* - void setDefault(Configured& parametrisation) const final
-
auto name() const -> const std::
string& -
auto description() const -> const std::
string& - auto active() const -> bool virtual
Private functions
-
void print(std::
ostream&) const override -
void set_value(const std::
string& value, Configured&) const override -
auto translate(const std::
string& value) const -> std:: string override - void copy(const Configuration& from, Configured& to) const override
Typedef documentation
#include <eckit/option/Option.h>
template<class T>
using eckit:: option:: FactoryOption<T>:: args_t = std:: vector<std:: string>
Function documentation
#include <eckit/option/Option.h>
template<class T>
template<typename T>
static void eckit:: option:: FactoryOption<T>:: copy(const std:: string& name,
const Configuration& from,
Configured& to)
template<class T>
size_t eckit:: option:: FactoryOption<T>:: set(Configured& param,
size_t values,
args_t::const_iterator begin,
args_t::const_iterator end) const override
Set the value of the option into parameter
, taking as many values as necessary from the range [begin, end)
.
values
indicates the number of items in[begin, end)
that were provided as an option value. This parameter is expected to be either 0 (for –flag options) or 1 (for traditional –option=
)
Return: number of items consumed from the range [begin, end)
.
#include <eckit/option/Option.h>
template<class T>
Option* eckit:: option:: FactoryOption<T>:: defaultValue(const std:: string& value)
#include <eckit/option/Option.h>
template<class T>
void eckit:: option:: FactoryOption<T>:: setDefault(Configured& parametrisation) const final
#include <eckit/option/Option.h>
template<class T>
const std:: string& eckit:: option:: FactoryOption<T>:: name() const
#include <eckit/option/Option.h>
template<class T>
const std:: string& eckit:: option:: FactoryOption<T>:: description() const
#include <eckit/option/Option.h>
template<class T>
bool eckit:: option:: FactoryOption<T>:: active() const virtual