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

Program file option class. More...

#include <FileOption.hh>

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

Public Types

typedef char const * CHAR_CONST_P
 function to allow atomatic conversion to the char *. More...
 
- Public Types inherited from utility::options::ScalarOption_T_< FileOptionKey, file::FileName >
typedef FileOptionKey key_type
 
typedef file::FileName value_type
 
typedef FileOptionKey Key
 
typedef file::FileName Value
 
- 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
 

Public Member Functions

 FileOption ()
 Default constructor. More...
 
 FileOption (FileOptionKey const &key_a, std::string const &description_a)
 Key + description constructor. More...
 
FileOptionclone () const override
 Clone this. More...
 
 ~FileOption () override
 Destructor. More...
 
FileOptiondefault_value (std::string const &value_a)
 Default value assignment. More...
 
FileOptiondef (std::string const &value_a)
 Default value assignment. More...
 
FileOptionvalue (std::string const &value_a)
 Value assignment. More...
 
FileOptionoperator() (std::string const &value_a)
 Value assignment. More...
 
 operator std::string ()
 function to allow atomatic conversion to the string. More...
 
 operator CHAR_CONST_P ()
 
bool is_value (std::string const &) const override
 Is a string readable as this option's value type? More...
 
bool is_cl_value (std::string const &value_str) const override
 Is a string readable as this option's value type and a legal command line value? More...
 
std::string type_string () const override
 Option type code string representation. More...
 
- Public Member Functions inherited from utility::options::ScalarOption_T_< FileOptionKey, file::FileName >
 ~ScalarOption_T_ () override
 Destructor. More...
 
void copy_from (Option const &other) override
 Copy operation. More...
 
 operator Value const & () const
 Value conversion. More...
 
ScalarOption_T_activate () override
 Activate. More...
 
ScalarOption_T_deactivate () override
 Deactivate. More...
 
ScalarOption_T_to_default () override
 Set to default value, if any. More...
 
ScalarOption_T_clear () override
 Clear. More...
 
ScalarOption_T_legal (Value const &value_a)
 Add a legal value. More...
 
bool legal () const override
 Legal value? More...
 
ScalarOption_T_shortd (std::string const &s)
 Set a short description. More...
 
ScalarOption_T_lower (Value const &value_a)
 Set a lower bound. More...
 
LegalBound const & lower () const
 Lower bound. More...
 
ScalarOption_T_strict_lower (Value const &value_a)
 Set a strict lower bound. More...
 
ScalarOption_T_upper (Value const &value_a)
 Set an upper bound. More...
 
LegalBound const & upper ()
 Upper bound. More...
 
ScalarOption_T_strict_upper (Value const &value_a)
 Set a strict upper bound. More...
 
virtual ScalarOption_T_default_value (Value const &value_a)
 Default value assignment. More...
 
Value const & default_value () const
 Default value. More...
 
virtual ScalarOption_T_def (Value const &value_a)
 Default value assignment. More...
 
ScalarOption_T_cl_value (std::string const &value_str) override
 Value assignment from a command line string. More...
 
virtual ScalarOption_T_value (Value const &value_a)
 Value assignment. More...
 
Value const & value () const
 Value. More...
 
virtual ScalarOption_T_operator() (Value const &value_a)
 Value assignment. More...
 
Value const & operator() () const
 Value. More...
 
ScalarOption_T_default_to (ScalarOption_T_ const &option)
 Default to another option's value. More...
 
bool legal_specs_report () const override
 Legal specifications check: Report and return error state. More...
 
bool legal_limits_report () const override
 Legal value limits check: Report and return error state. More...
 
bool legal_size_report () const override
 Legal size limits check: Report and return error state. More...
 
bool legal_default_report () const override
 Legal default value check: Report and return error state. More...
 
void legal_default_check () const override
 Legal default value check. More...
 
void legal_default_check (Value const &value_a) const
 Legal default value check. More...
 
bool legal_report () const override
 Legal value check: Report and return error state. More...
 
void legal_check () const override
 Legal value check. More...
 
void legal_check (Value const &value_a) const
 Legal value check. More...
 
bool specified_report () const override
 Required specified option check: Report and return error state. More...
 
void specified_check () const override
 Required specified option check. More...
 
Key const & key () const override
 Key. More...
 
std::string const & id () const override
 ID. More...
 
std::string const & identifier () const override
 Identifier. More...
 
std::string const & code () const override
 Code. More...
 
std::string const & name () const override
 Name. More...
 
std::string const & description () const override
 Description. More...
 
void description (std::string const &sd)
 
std::string const & short_description () const override
 Short Description. More...
 
void short_description (std::string const &sd)
 
bool legal_default () const override
 Legal or inactive default value? More...
 
bool legal_value (Value const &value_a) const
 Is the given value legal? More...
 
bool has_default () const override
 Has a default? More...
 
bool default_active () const override
 Default active? More...
 
bool default_inactive () const override
 Default inactive? More...
 
bool active () const override
 Active? That is, the option has some value, either the default one or specified on the command line. More...
 
bool user () const override
 User-specified? That is, the option value was specified on the command line. You should probably use active() instead in almost all cases! More...
 
bool can_hold_another () const override
 Can another value be added and stay within any size constraints? More...
 
Size default_size () const override
 Default size (number of default values) More...
 
Size n_default_value () const override
 Number of default values (default size) More...
 
Size size () const override
 Size (number of values) More...
 
Size n_value () const override
 Number of values (size) More...
 
bool has_any_of_characters (std::string const &str1, std::string const &s) const
 Has Any Character of a std::string? non ambiguous vesrion for Python binding. More...
 
std::string legal_string (bool const ) const
 Legal value string representation. More...
 
std::string legal_string () const override
 Legal value string representation. More...
 
std::string size_constraint_string () const override
 Size constraint string representation. More...
 
std::string default_string () const override
 Default value string representation. More...
 
std::string raw_default_string () const override
 Default value string representation. More...
 
std::string value_string () const override
 Value string representation. More...
 
std::string raw_value_string () const override
 Value string representation. More...
 
std::string equals_string () const override
 =Value string representation More...
 
Value value_or (Value const &value_a) const
 Value or passed default if inactive. More...
 
Value user_or (Value const &value_a) const
 Value or passed default if not user-specified. More...
 
- Public Member Functions inherited from utility::options::ScalarOption
 ~ScalarOption () override
 Destructor. More...
 
void set_value (std::string const &value_str, bool=false) override
 Value assignment from full 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...
 
Optionis_group (bool value)
 
bool is_group () const
 Is this the synonymous option for an option group (e.g. -in:file:file) 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

Value value_of (std::string const &value_str) const override
 Value of a string. More...
 
- Protected Member Functions inherited from utility::options::ScalarOption_T_< FileOptionKey, file::FileName >
 ScalarOption_T_ ()
 Default constructor. More...
 
 ScalarOption_T_ (ScalarOption_T_ const &option)
 Copy constructor. More...
 
 ScalarOption_T_ (Key const &key_a, std::string const &description_a)
 Key + description constructor. More...
 
ScalarOption_T_operator= (ScalarOption_T_ const &option)
 Copy assignment. More...
 
virtual std::string value_string_of (Value const &v) const
 String representation of a given value. More...
 
void default_inactive_error () const
 Error handler for using inactive option value. More...
 
void inactive_error () const
 Error handler for using inactive option value. More...
 
virtual void stream_setup (std::ostream &) const
 Setup stream state for the Option value type. More...
 
bool unconstrained () const
 Value is unconstrained? More...
 
bool default_is_legal () const
 Default value is a specified legal value? More...
 
bool value_is_legal () const
 Value is a specified legal value? More...
 
bool value_is_legal (Value const &value_a) const
 Value is legal? More...
 
bool default_obeys_bounds () const
 Default value obeys specified bounds? More...
 
bool value_obeys_bounds () const
 Value obeys specified bounds? More...
 
bool value_obeys_bounds (Value const &value_a) const
 Given value obeys specified bounds? More...
 
- Protected Member Functions inherited from utility::options::ScalarOption
 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 ScalarOption_T_
< FileOptionKey,
file::FileName
Super
 
typedef file::FileName FileName
 

Private Attributes

std::string cached_value_
 temp storage for option value in string form. We need this to make type conversion to char * possible. More...
 

Additional Inherited Members

- Protected Types inherited from utility::options::Option
enum  State { INACTIVE, DEFAULT, USER }
 Option state enumeration. More...
 

Detailed Description

Program file option class.

Member Typedef Documentation

function to allow atomatic conversion to the char *.

Constructor & Destructor Documentation

utility::options::FileOption::FileOption ( )
inline

Default constructor.

Referenced by clone().

utility::options::FileOption::FileOption ( FileOptionKey const &  key_a,
std::string const &  description_a 
)
inline

Key + description constructor.

utility::options::FileOption::~FileOption ( )
inlineoverride

Destructor.

Member Function Documentation

FileOption* utility::options::FileOption::clone ( ) const
inlineoverridevirtual
FileOption& utility::options::FileOption::def ( std::string const &  value_a)
inline
FileOption& utility::options::FileOption::default_value ( std::string const &  value_a)
inline
bool utility::options::FileOption::is_cl_value ( std::string const &  value_str) const
inlineoverridevirtual

Is a string readable as this option's value type and a legal command line value?

Implements utility::options::Option.

References ObjexxFCL::is_any_of().

bool utility::options::FileOption::is_value ( std::string const &  ) const
inlineoverridevirtual

Is a string readable as this option's value type?

Implements utility::options::Option.

utility::options::FileOption::operator CHAR_CONST_P ( )
inline
utility::options::FileOption::operator std::string ( )
inline

function to allow atomatic conversion to the string.

References utility::options::ScalarOption_T_< FileOptionKey, file::FileName >::value().

FileOption& utility::options::FileOption::operator() ( std::string const &  value_a)
inline
std::string utility::options::FileOption::type_string ( ) const
inlineoverridevirtual

Option type code string representation.

Implements utility::options::Option.

FileOption& utility::options::FileOption::value ( std::string const &  value_a)
inline
Value utility::options::FileOption::value_of ( std::string const &  value_str) const
inlineoverrideprotectedvirtual

Member Data Documentation

std::string utility::options::FileOption::cached_value_
private

temp storage for option value in string form. We need this to make type conversion to char * possible.

Referenced by operator CHAR_CONST_P().


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