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::ScalarOption Class Referenceabstract

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

#include <ScalarOption.hh>

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

Public Member Functions

ScalarOptionclone () const override=0
 Clone this. More...
 
 ~ScalarOption () override
 Destructor. More...
 
ScalarOptionactivate () override=0
 Activate. More...
 
ScalarOptiondeactivate () override=0
 Deactivate. More...
 
ScalarOptionto_default () override=0
 Set to default value, if any. More...
 
ScalarOptionclear () override=0
 Clear. More...
 
void set_value (std::string const &value_str, bool=false) override
 Value assignment from full string. More...
 
ScalarOptioncl_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
 Value assignemt from a command line string but without a ScalarOption & return type. 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

 ScalarOption ()
 Default constructor. More...
 
 ScalarOption (ScalarOption const &)=default
 Copy constructor. More...
 
ScalarOptionoperator= (ScalarOption 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 scalar-valued option interface class.

Member Typedef Documentation

Constructor & Destructor Documentation

utility::options::ScalarOption::ScalarOption ( )
inlineprotected

Default constructor.

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

Copy constructor.

utility::options::ScalarOption::~ScalarOption ( )
inlineoverride

Destructor.

Member Function Documentation

ScalarOption& utility::options::ScalarOption::activate ( )
overridepure virtual
ScalarOption& utility::options::ScalarOption::cl_value ( std::string const &  value_str)
overridepure virtual
ScalarOption& utility::options::ScalarOption::clear ( )
overridepure virtual
ScalarOption* utility::options::ScalarOption::clone ( ) const
overridepure virtual
ScalarOption& utility::options::ScalarOption::deactivate ( )
overridepure virtual
ScalarOption& utility::options::ScalarOption::operator= ( ScalarOption const &  )
inlineprotected

Copy assignment.

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

Value assignemt from a command line string but without a ScalarOption & return type.

Implements utility::options::Option.

References cl_value().

void utility::options::ScalarOption::set_value ( std::string const &  value_str,
bool  = false 
)
inlineoverridevirtual

Value assignment from full string.

Implements utility::options::Option.

References cl_value().

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

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