Rosetta 3.3
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Friends
utility::options::Option Class Reference

Program option interface class. More...

#include <Option.hh>

Inheritance diagram for utility::options::Option:
Inheritance graph
[legend]
Collaboration diagram for utility::options::Option:
Collaboration graph
[legend]

List of all members.

Public Types

typedef OptionKey key_type
typedef std::size_t size_type
typedef OptionKey Key
typedef std::size_t Size

Public Member Functions

virtual Optionclone () const =0
 Clone this.
virtual ~Option ()
 Destructor.
virtual Optionactivate ()=0
 Activate.
virtual Optiondeactivate ()=0
 Deactivate.
virtual Optionto_default ()=0
 Set to default value, if any.
virtual Optionclear ()=0
 Clear.
virtual Optioncl_value (std::string const &value_str)=0
 Value assignment from a command line string.
virtual bool legal_specs_report () const =0
 Legal specifications check: Report and return error state.
virtual bool legal_limits_report () const =0
 Legal value limits check: Report and return error state.
virtual bool legal_size_report () const =0
 Legal size limits check: Report and return error state.
virtual bool legal_default_report () const =0
 Legal default value check: Report and return error state.
virtual void legal_default_check () const =0
 Legal default value check.
virtual bool legal_report () const =0
 Legal value check: Report and return error state.
virtual void legal_check () const =0
 Legal value check.
virtual bool specified_report () const =0
 Required specified option check: Report and return error state.
virtual void specified_check () const =0
 Required specified option check.
virtual Key const & key () const =0
 Key.
virtual std::string const & id () const =0
 ID.
virtual std::string const & identifier () const =0
 Identifier.
virtual std::string const & code () const =0
 Code.
virtual std::string const & name () const =0
 Name.
virtual std::string const & description () const =0
 Description.
virtual std::string const & short_description () const =0
 short_Description
virtual bool legal_default () const =0
 Legal or inactive default value?
virtual bool legal () const =0
 Legal value?
virtual bool has_default () const =0
 Has a default?
virtual bool default_active () const =0
 Default active?
virtual bool default_inactive () const =0
 Default inactive?
virtual bool active () const =0
 Active? That is, the option has some value, either the default one or specified on the command line.
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!
virtual bool is_value (std::string const &value_str) const =0
 Is a string readable as this option's value type?
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?
virtual bool can_hold_another () const =0
 Can another value be added and stay within any size constraints?
virtual Size default_size () const =0
 Default size (number of default values)
virtual Size n_default_value () const =0
 Number of default values (default size)
virtual Size size () const =0
 Size (number of values)
virtual Size n_value () const =0
 Number of values (size)
virtual std::string type_string () const =0
 Option type code string representation.
virtual std::string legal_string () const =0
 Legal value string representation.
virtual std::string size_constraint_string () const =0
 Size constraint string representation.
virtual std::string default_string () const =0
 Default value string representation.
virtual std::string value_string () const =0
 Value string representation.
virtual std::string equals_string () const =0
 =Value string representation
void been_accessed () const
 Set access property to true.
void set_accessed (bool setting) const
bool is_been_accessed () const
 Return true if option value was anyhow accessed.

Protected Types

enum  State { INACTIVE, DEFAULT, USER }
 Option state enumeration. More...

Protected Member Functions

 Option ()
 Default constructor.
 Option (Option const &)
 Copy constructor.
Optionoperator= (Option const &)
 Copy assignment.

Friends

bool operator< (Option const &a, Option const &b)
 Option < Option.

Detailed Description

Program option interface class.


Member Typedef Documentation


Member Enumeration Documentation

Option state enumeration.

Enumerator:
INACTIVE 
DEFAULT 
USER 

Constructor & Destructor Documentation

utility::options::Option::Option ( ) [inline, protected]

Default constructor.

utility::options::Option::Option ( Option const &  ) [inline, protected]

Copy constructor.

virtual utility::options::Option::~Option ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual Option& utility::options::Option::activate ( ) [pure virtual]
virtual bool utility::options::Option::active ( ) const [pure virtual]
void utility::options::Option::been_accessed ( ) const [inline]
virtual bool utility::options::Option::can_hold_another ( ) const [pure virtual]
virtual Option& utility::options::Option::cl_value ( std::string const &  value_str) [pure virtual]
virtual Option& utility::options::Option::clear ( ) [pure virtual]
virtual Option* utility::options::Option::clone ( ) const [pure virtual]

Clone this.

Implemented in utility::options::AnyOption< T >, utility::options::AnyVectorOption< T >, utility::options::BooleanOption, utility::options::BooleanVectorOption, utility::options::FileOption, utility::options::FileVectorOption, utility::options::IntegerOption, utility::options::IntegerVectorOption, utility::options::PathOption, utility::options::PathVectorOption, utility::options::RealOption, utility::options::RealVectorOption, utility::options::ScalarOption, utility::options::ScalarOption_T_< K, T >, utility::options::StringOption, utility::options::StringVectorOption, utility::options::VectorOption, utility::options::VectorOption_T_< K, T >, utility::options::ScalarOption_T_< RealOptionKey, double >, utility::options::ScalarOption_T_< AnyOptionKey, T >, utility::options::ScalarOption_T_< IntegerOptionKey, int >, utility::options::ScalarOption_T_< StringOptionKey, std::string >, utility::options::ScalarOption_T_< FileOptionKey, file::FileName >, utility::options::ScalarOption_T_< BooleanOptionKey, bool >, utility::options::ScalarOption_T_< PathOptionKey, file::PathName >, utility::options::VectorOption_T_< PathVectorOptionKey, file::PathName >, utility::options::VectorOption_T_< IntegerVectorOptionKey, int >, utility::options::VectorOption_T_< RealVectorOptionKey, double >, utility::options::VectorOption_T_< FileVectorOptionKey, file::FileName >, utility::options::VectorOption_T_< StringVectorOptionKey, std::string >, utility::options::VectorOption_T_< AnyVectorOptionKey, T >, and utility::options::VectorOption_T_< BooleanVectorOptionKey, bool >.

virtual std::string const& utility::options::Option::code ( ) const [pure virtual]
virtual Option& utility::options::Option::deactivate ( ) [pure virtual]
virtual bool utility::options::Option::default_active ( ) const [pure virtual]
virtual bool utility::options::Option::default_inactive ( ) const [pure virtual]
virtual Size utility::options::Option::default_size ( ) const [pure virtual]
virtual std::string utility::options::Option::default_string ( ) const [pure virtual]
virtual std::string const& utility::options::Option::description ( ) const [pure virtual]
virtual std::string utility::options::Option::equals_string ( ) const [pure virtual]
virtual bool utility::options::Option::has_default ( ) const [pure virtual]
virtual std::string const& utility::options::Option::id ( ) const [pure virtual]

ID.

Implemented in utility::options::ScalarOption_T_< K, T >, utility::options::VectorOption_T_< K, T >, utility::options::ScalarOption_T_< RealOptionKey, double >, utility::options::ScalarOption_T_< AnyOptionKey, T >, utility::options::ScalarOption_T_< IntegerOptionKey, int >, utility::options::ScalarOption_T_< StringOptionKey, std::string >, utility::options::ScalarOption_T_< FileOptionKey, file::FileName >, utility::options::ScalarOption_T_< BooleanOptionKey, bool >, utility::options::ScalarOption_T_< PathOptionKey, file::PathName >, utility::options::VectorOption_T_< PathVectorOptionKey, file::PathName >, utility::options::VectorOption_T_< IntegerVectorOptionKey, int >, utility::options::VectorOption_T_< RealVectorOptionKey, double >, utility::options::VectorOption_T_< FileVectorOptionKey, file::FileName >, utility::options::VectorOption_T_< StringVectorOptionKey, std::string >, utility::options::VectorOption_T_< AnyVectorOptionKey, T >, and utility::options::VectorOption_T_< BooleanVectorOptionKey, bool >.

Referenced by utility::options::OptionCollection::check_key(), utility::options::VariantOption< VectorOption >::id(), utility::options::operator<<(), utility::options::show_accessed_options_T(), utility::options::OptionCollection::show_all(), utility::options::OptionCollection::show_all_hier(), utility::options::OptionCollection::show_inaccessed_user_options(), utility::options::OptionCollection::show_option_help(), utility::options::OptionCollection::show_option_help_heir(), utility::options::OptionCollection::show_table_text(), utility::options::OptionCollection::show_table_Wiki(), and utility::options::OptionCollection::show_user().

virtual std::string const& utility::options::Option::identifier ( ) const [pure virtual]
bool utility::options::Option::is_been_accessed ( ) const [inline]
virtual bool utility::options::Option::is_cl_value ( std::string const &  value_str) const [pure virtual]
virtual bool utility::options::Option::is_value ( std::string const &  value_str) const [pure virtual]
virtual Key const& utility::options::Option::key ( ) const [pure virtual]
virtual bool utility::options::Option::legal ( ) const [pure virtual]
virtual void utility::options::Option::legal_check ( ) const [pure virtual]
virtual bool utility::options::Option::legal_default ( ) const [pure virtual]
virtual void utility::options::Option::legal_default_check ( ) const [pure virtual]
virtual bool utility::options::Option::legal_default_report ( ) const [pure virtual]
virtual bool utility::options::Option::legal_limits_report ( ) const [pure virtual]
virtual bool utility::options::Option::legal_report ( ) const [pure virtual]
virtual bool utility::options::Option::legal_size_report ( ) const [pure virtual]
virtual bool utility::options::Option::legal_specs_report ( ) const [pure virtual]
virtual std::string utility::options::Option::legal_string ( ) const [pure virtual]
virtual Size utility::options::Option::n_default_value ( ) const [pure virtual]
virtual Size utility::options::Option::n_value ( ) const [pure virtual]
virtual std::string const& utility::options::Option::name ( ) const [pure virtual]
Option& utility::options::Option::operator= ( Option const &  ) [inline, protected]

Copy assignment.

void utility::options::Option::set_accessed ( bool  setting) const [inline]
virtual std::string const& utility::options::Option::short_description ( ) const [pure virtual]
virtual Size utility::options::Option::size ( ) const [pure virtual]
virtual std::string utility::options::Option::size_constraint_string ( ) const [pure virtual]
virtual void utility::options::Option::specified_check ( ) const [pure virtual]
virtual bool utility::options::Option::specified_report ( ) const [pure virtual]
virtual Option& utility::options::Option::to_default ( ) [pure virtual]
virtual std::string utility::options::Option::type_string ( ) const [pure virtual]
virtual bool utility::options::Option::user ( ) const [pure virtual]
virtual std::string utility::options::Option::value_string ( ) const [pure virtual]

Friends And Related Function Documentation

bool operator< ( Option const &  a,
Option const &  b 
) [friend]

Option < Option.

Note:
Key-based ordering
Needed for use as option in associative containers

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines