class
#include <eckit/option/Option.h>
Option
Derived classes
-
template<class T>class BaseOption
-
template<class T>class BaseOption
-
template<class T>class BaseOption
-
template<class T>class BaseOption
- class Separator
Public types
-
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
-
Option(const std::
string& name, const std:: string& description) - ~Option() defaulted virtual
Public functions
-
auto name() const -> const std::
string& -
auto description() const -> const std::
string& - auto active() const -> bool virtual
- auto set(Configured& param, size_t values, args_t::const_iterator begin, args_t::const_iterator end) const -> size_t pure virtual
- void copy(const Configuration& from, Configured& to) const pure virtual
- void setDefault(Configured&) const pure virtual
Private functions
-
void print(std::
ostream&) const pure virtual
Friends
-
auto operator<<(std::
ostream& s, const Option& p) -> std:: ostream&
Function documentation
size_t eckit:: option:: Option:: set(Configured& param,
size_t values,
args_t::const_iterator begin,
args_t::const_iterator end) const pure virtual
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)
.