template<class T>
VectorOption class

Base classes

template<class T>
class eckit::option::BaseOption<std::vector<T>>

Public types

using base_t = BaseOption<std::vector<T>>
using args_t = Option::args_t

Public static functions

static void copy(const std::string& name, const Configuration& from, Configured& to)

Constructors, destructors, conversion operators

VectorOption(const std::string& name, const std::string& description, size_t size, const char* separator = "/")
VectorOption(const std::string& name, const std::string& description, size_t size, const std::vector<T>& default_value, const char* separator = "/")
~VectorOption() defaulted override

Public functions

auto set(Configured&, size_t values, args_t::const_iterator begin, args_t::const_iterator end) const -> size_t override
auto defaultValue(const std::string& value) -> Option*
auto defaultValue(const std::string& value) -> Option*
void setDefault(Configured& parametrisation) const final
void setDefault(Configured& parametrisation) const final
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

Private functions

void print(std::ostream&) const override
auto translate(const std::string& value) const -> std::vector<T> override

Function documentation

template<class T _1>
static void VectorOption<_1>::copy(const std::string& name, const Configuration& from, Configured& to)

template<class T _1>
Option* VectorOption<_1>::defaultValue(const std::string& value)

template<class T _1>
Option* VectorOption<_1>::defaultValue(const std::string& value)

template<class T _1>
void VectorOption<_1>::setDefault(Configured& parametrisation) const final

template<class T _1>
void VectorOption<_1>::setDefault(Configured& parametrisation) const final

template<class T _1>
const std::string& VectorOption<_1>::name() const

template<class T _1>
const std::string& VectorOption<_1>::description() const

template<class T _1>
bool VectorOption<_1>::active() const virtual

template<class T _1>
size_t VectorOption<_1>::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).

template<class T _1>
void VectorOption<_1>::copy(const Configuration& from, Configured& to) const pure virtual

This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.