class
#include <eckit/option/MultiValueOption.h>
MultiValueOption
Base classes
-
template<class T>class BaseOption<std::vector<std::string>>
Public types
-
using base_t = BaseOption<std::
vector<std:: string>> -
using values_t = std::
vector<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
-
MultiValueOption(const std::
string& name, const std:: string& description, size_t n_mandatory_values) -
MultiValueOption(const std::
string& name, const std:: string& description, size_t n_mandatory_values, size_t n_optional_values) -
MultiValueOption(const std::
string& name, const std:: string& description, size_t n_mandatory_values, const values_ t& default_values) -
MultiValueOption(const std::
string& name, const std:: string& description, size_t n_mandatory_values, size_t n_optional_values, const values_ t& default_values) - ~MultiValueOption() 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
-
void print(std::
ostream&) const 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 set_value(const values_
t& values, Configured&) const override -
auto translate(const std::
string& value) const -> values_ t override - void copy(const Configuration& from, Configured& to) const override
Typedef documentation
using eckit:: option:: MultiValueOption:: args_t = std:: vector<std:: string>
#include <eckit/option/Option.h>
Function documentation
#include <eckit/option/Option.h>
template<typename T>
static void eckit:: option:: MultiValueOption:: copy(const std:: string& name,
const Configuration& from,
Configured& to)
size_t eckit:: option:: MultiValueOption:: 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)
.
Option* eckit:: option:: MultiValueOption:: defaultValue(const std:: string& value)
#include <eckit/option/Option.h>
void eckit:: option:: MultiValueOption:: setDefault(Configured& parametrisation) const final
#include <eckit/option/Option.h>
const std:: string& eckit:: option:: MultiValueOption:: name() const
#include <eckit/option/Option.h>
const std:: string& eckit:: option:: MultiValueOption:: description() const
#include <eckit/option/Option.h>
bool eckit:: option:: MultiValueOption:: active() const virtual
#include <eckit/option/Option.h>