Rosetta  2019.40
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Types | List of all members
utility::options::VectorOption Class Referenceabstract

Program vector-valued option interface class. More...

#include <VectorOption.hh>

Inheritance diagram for utility::options::VectorOption:
Inheritance graph
[legend]

Public Member Functions

VectorOptionclone () const override=0
 Clone this. More...
 
 ~VectorOption () override
 Destructor. More...
 
VectorOptionactivate () override=0
 Activate. More...
 
VectorOptiondeactivate () override=0
 Deactivate. More...
 
VectorOptionto_default () override=0
 Set to default value, if any. More...
 
VectorOptionclear () override=0
 Clear. More...
 
void set_value (std::string const &value_str, bool reset=false) override
 Value assignemt from a command line string but without a VectorOption & return type. This will separate arguments by whitespace and set the vector option accordingly. If reset is true, the current values will be cleared first. More...
 
VectorOptioncl_value (std::string const &value_str) override=0
 Value assignment from a command line string. More...
 
void set_cl_value (std::string const &value_str) override
 Set the value of the option from a string from the commandline options. More...
 
virtual VectorOptionn (Size const n_a)=0
 Fixed number of values required assignment. More...
 
virtual VectorOptionn_lower (Size const n_a)=0
 Lower number of values allowed assignment. More...
 
virtual VectorOptionn_upper (Size const n_a)=0
 Upper number of values allowed assignment. More...
 
virtual bool fixed_size () const =0
 Fixed number of values required? More...
 
virtual Size n () const =0
 Fixed number of values required (zero if none) More...
 
virtual Size n_lower () const =0
 Lower number of values allowed (zero if none) More...
 
virtual Size n_upper () const =0
 Upper number of values allowed (zero if none) More...
 
virtual bool legal_default_value () const =0
 Legal or inactive default value? More...
 
virtual bool legal_default_size () const =0
 Legal default value size? More...
 
virtual bool legal_value () const =0
 Legal value? More...
 
virtual bool legal_size () const =0
 Legal value size? More...
 
- Public Member Functions inherited from utility::options::Option
virtual ~Option ()
 Destructor. More...
 
virtual void copy_from (Option const &other)=0
 Copy operation – requires that other match the type of this. More...
 
virtual bool legal_specs_report () const =0
 Legal specifications check: Report and return error state. More...
 
virtual bool legal_limits_report () const =0
 Legal value limits check: Report and return error state. More...
 
virtual bool legal_size_report () const =0
 Legal size limits check: Report and return error state. More...
 
virtual bool legal_default_report () const =0
 Legal default value check: Report and return error state. More...
 
virtual void legal_default_check () const =0
 Legal default value check. More...
 
virtual bool legal_report () const =0
 Legal value check: Report and return error state. More...
 
virtual void legal_check () const =0
 Legal value check. More...
 
virtual bool specified_report () const =0
 Required specified option check: Report and return error state. More...
 
virtual void specified_check () const =0
 Required specified option check. More...
 
Optionis_group (bool value)
 
bool is_group () const
 Is this the synonymous option for an option group (e.g. -in:file:file) More...
 
virtual Key const & key () const =0
 Key. More...
 
virtual std::string const & id () const =0
 ID. More...
 
virtual std::string const & identifier () const =0
 Identifier. More...
 
virtual std::string const & code () const =0
 Code. More...
 
virtual std::string const & name () const =0
 Name. More...
 
virtual std::string const & description () const =0
 Description. More...
 
virtual std::string const & short_description () const =0
 short_Description More...
 
virtual bool legal_default () const =0
 Legal or inactive default value? More...
 
virtual bool legal () const =0
 Legal value? More...
 
virtual bool has_default () const =0
 Has a default? More...
 
virtual bool default_active () const =0
 Default active? More...
 
virtual bool default_inactive () const =0
 Default inactive? More...
 
virtual bool active () const =0
 Active? That is, the option has some value, either the default one or specified on the command line. More...
 
virtual bool user () const =0
 User-specified? That is, the option value was specified on the command line. You should probably use active() instead in almost all cases! More...
 
virtual bool is_value (std::string const &value_str) const =0
 Is a string readable as this option's value type? More...
 
virtual bool is_cl_value (std::string const &value_str) const =0
 Is a string readable as this option's value type and a legal command line value? More...
 
virtual bool can_hold_another () const =0
 Can another value be added and stay within any size constraints? More...
 
virtual Size default_size () const =0
 Default size (number of default values) More...
 
virtual Size n_default_value () const =0
 Number of default values (default size) More...
 
virtual Size size () const =0
 Size (number of values) More...
 
virtual Size n_value () const =0
 Number of values (size) More...
 
virtual std::string type_string () const =0
 Option type code string representation. More...
 
virtual std::string legal_string () const =0
 Legal value string representation. More...
 
virtual std::string size_constraint_string () const =0
 Size constraint string representation. More...
 
virtual std::string default_string () const =0
 Default value string representation. More...
 
virtual std::string raw_default_string () const =0
 Default value string representation. More...
 
virtual std::string value_string () const =0
 Value string representation. More...
 
virtual std::string raw_value_string () const =0
 Value string representation. More...
 
virtual std::string equals_string () const =0
 =Value string representation More...
 
void been_accessed () const
 Set access property to true. More...
 
void set_accessed (bool setting) const
 
bool is_been_accessed () const
 Return true if option value was anyhow accessed. More...
 
Optionrestrict_access (bool setting)
 Restrict direct access to option for general use. More...
 
void check_restricted_access (bool do_check) const
 

Protected Member Functions

 VectorOption ()
 Default constructor. More...
 
 VectorOption (VectorOption const &)=default
 Copy constructor. More...
 
VectorOptionoperator= (VectorOption const &)
 Copy assignment. More...
 
- Protected Member Functions inherited from utility::options::Option
 Option ()
 Default constructor. More...
 
 Option (Option const &option)
 Copy constructor. More...
 
Optionoperator= (Option const &option)
 Copy assignment. More...
 

Private Types

typedef Option Super
 

Additional Inherited Members

- Public Types inherited from utility::options::Option
typedef OptionKey key_type
 
typedef std::size_t size_type
 
typedef OptionKey Key
 
typedef std::size_t Size
 
- Protected Types inherited from utility::options::Option
enum  State { INACTIVE, DEFAULT, USER }
 Option state enumeration. More...
 

Detailed Description

Program vector-valued option interface class.

Member Typedef Documentation

Constructor & Destructor Documentation

utility::options::VectorOption::VectorOption ( )
inlineprotected

Default constructor.

utility::options::VectorOption::VectorOption ( VectorOption const &  )
inlineprotecteddefault

Copy constructor.

utility::options::VectorOption::~VectorOption ( )
inlineoverride

Destructor.

Member Function Documentation

VectorOption& utility::options::VectorOption::activate ( )
overridepure virtual
VectorOption& utility::options::VectorOption::cl_value ( std::string const &  value_str)
overridepure virtual
VectorOption& utility::options::VectorOption::clear ( )
overridepure virtual
VectorOption* utility::options::VectorOption::clone ( ) const
overridepure virtual
VectorOption& utility::options::VectorOption::deactivate ( )
overridepure virtual
virtual bool utility::options::VectorOption::fixed_size ( ) const
pure virtual
virtual bool utility::options::VectorOption::legal_default_size ( ) const
pure virtual
virtual bool utility::options::VectorOption::legal_default_value ( ) const
pure virtual
virtual bool utility::options::VectorOption::legal_size ( ) const
pure virtual
virtual bool utility::options::VectorOption::legal_value ( ) const
pure virtual
virtual VectorOption& utility::options::VectorOption::n ( Size const  n_a)
pure virtual
virtual Size utility::options::VectorOption::n ( ) const
pure virtual
virtual VectorOption& utility::options::VectorOption::n_lower ( Size const  n_a)
pure virtual
virtual Size utility::options::VectorOption::n_lower ( ) const
pure virtual
virtual VectorOption& utility::options::VectorOption::n_upper ( Size const  n_a)
pure virtual
virtual Size utility::options::VectorOption::n_upper ( ) const
pure virtual
VectorOption& utility::options::VectorOption::operator= ( VectorOption const &  )
inlineprotected

Copy assignment.

void utility::options::VectorOption::set_cl_value ( std::string const &  value_str)
inlineoverridevirtual

Set the value of the option from a string from the commandline options.

The difference between set_value() and set_cl_value() is that set_cl_value() assumes that the options have been pre-vectorized by the commandline, and the string is being passed in (multiple) vectorized pieces. set_value(), in contrast, assumes that it's being passed a pre-vectorized string.

Implements utility::options::Option.

References cl_value().

void utility::options::VectorOption::set_value ( std::string const &  value_str,
bool  reset = false 
)
overridevirtual

Value assignemt from a command line string but without a VectorOption & return type. This will separate arguments by whitespace and set the vector option accordingly. If reset is true, the current values will be cleared first.

Implements utility::options::Option.

References cl_value(), clear(), and utility::quoted_split().

VectorOption& utility::options::VectorOption::to_default ( )
overridepure virtual

The documentation for this class was generated from the following files: