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

Program options collection. More...

#include <OptionCollection.hh>

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

Public Member Functions

 OptionCollection ()
 Default constructor. More...
 
 ~OptionCollection () override
 Destructor. More...
 
void add_built_in_options ()
 Add the built-in options. More...
 
BooleanOptionadd (BooleanOptionKey const &key, std::string const &description)
 Add a BooleanOption. More...
 
IntegerOptionadd (IntegerOptionKey const &key, std::string const &description)
 Add an IntegerOption. More...
 
RealOptionadd (RealOptionKey const &key, std::string const &description)
 Add a RealOption. More...
 
StringOptionadd (StringOptionKey const &key, std::string const &description)
 Add a StringOption. More...
 
FileOptionadd (FileOptionKey const &key, std::string const &description)
 Add a FileOption. More...
 
PathOptionadd (PathOptionKey const &key, std::string const &description)
 Add a PathOption. More...
 
BooleanVectorOptionadd (BooleanVectorOptionKey const &key, std::string const &description)
 Add a BooleanVectorOption. More...
 
IntegerVectorOptionadd (IntegerVectorOptionKey const &key, std::string const &description)
 Add an IntegerVectorOption. More...
 
RealVectorOptionadd (RealVectorOptionKey const &key, std::string const &description)
 Add a RealVectorOption. More...
 
ResidueChainVectorOptionadd (ResidueChainVectorOptionKey const &key, std::string const &description)
 Add an ResidueChainVectorOption. More...
 
StringVectorOptionadd (StringVectorOptionKey const &key, std::string const &description)
 Add a StringVectorOption. More...
 
FileVectorOptionadd (FileVectorOptionKey const &key, std::string const &description)
 Add a FileVectorOption. More...
 
PathVectorOptionadd (PathVectorOptionKey const &key, std::string const &description)
 Add a PathVectorOption. More...
 
BooleanOptionadd (BooleanOption const &option)
 Add a BooleanOption. More...
 
IntegerOptionadd (IntegerOption const &option)
 Add an IntegerOption. More...
 
RealOptionadd (RealOption const &option)
 Add a RealOption. More...
 
StringOptionadd (StringOption const &option)
 Add a StringOption. More...
 
FileOptionadd (FileOption const &option)
 Add a FileOption. More...
 
PathOptionadd (PathOption const &option)
 Add a PathOption. More...
 
template<typename T >
AnyOption< T > & add (AnyOption< T > const &option)
 Add an AnyOption. More...
 
BooleanVectorOptionadd (BooleanVectorOption const &option)
 Add a BooleanVectorOption. More...
 
IntegerVectorOptionadd (IntegerVectorOption const &option)
 Add an IntegerVectorOption. More...
 
RealVectorOptionadd (RealVectorOption const &option)
 Add a RealVectorOption. More...
 
ResidueChainVectorOptionadd (ResidueChainVectorOption const &option)
 Add an ResidueChainVectorOption. More...
 
StringVectorOptionadd (StringVectorOption const &option)
 Add a StringVectorOption. More...
 
FileVectorOptionadd (FileVectorOption const &option)
 Add a FileVectorOption. More...
 
PathVectorOptionadd (PathVectorOption const &option)
 Add a PathVectorOption. More...
 
template<typename T >
AnyVectorOption< T > & add (AnyVectorOption< T > const &option)
 Add an AnyVectorOption. More...
 
void check_specs () const
 Check for problems in the option specifications. More...
 
void load (const std::vector< std::string > &args, bool const free_args)
 Load the user-specified option values. More...
 
void load (int const argc, char *const argv[], bool const free_args=false)
 Load the user-specified option values. More...
 
void load (std::string executable_name, ValueStrings &arg_strings, bool const free_args)
 Load the user-specified option values. More...
 
void load_options_from_file (std::string const &file_string, std::string const &cid="")
 Load all options in a flags file. More...
 
void load_options_from_file_exception (std::string const &file_string, std::string const &cid="")
 same as load_options_from_file, but throws exception instead of call to std::exit More...
 
void load_options_from_stream (std::istream &stream, std::string const &file_string="STREAM", std::string const &cid="", bool print_lines=false)
 Load all options in a flags file. More...
 
void check_values () const
 Check for problems in the option values. More...
 
void show_help (std::ostream &stream)
 Show all the options and their descriptions. More...
 
void show_option_help (OptionKey const &, std::string &group, std::ostream &stream)
 Show one option and it description. More...
 
void show_help_hier (std::ostream &stream)
 Show all the options and their descriptions in a hierarchy format. More...
 
void show_option_help_hier (OptionKey const &, std::string &group, std::ostream &stream)
 Show one option and it description in a hierarchy format. More...
 
void show_user (std::ostream &stream) const
 Show the user-specified options and their values. More...
 
void show_all (std::ostream &stream) const
 Show all the options and their values. More...
 
void show_all_hier (std::ostream &stream) const
 Show all the options and their values in a hierarchy format. More...
 
void show_table_text (std::ostream &stream) const
 Show the options definitions table in text format. More...
 
void show_table_Wiki (std::ostream &stream) const
 Show the options definitions table in Wiki format. More...
 
void show_accessed_options (std::ostream &stream) const
 Show accessed list of options. More...
 
void show_inaccessed_user_options (std::ostream &stream) const
 Show inaccessed user-specified options. More...
 
void show_unused_options (std::ostream &stream) const
 Show options that were user-specified, but not yet accessed. Differs from show_inaccessed_user_options() mainly by formatting And how the options are accessed. (This one should be destructor safe.) More...
 
std::string get_argv () const
 Returns a copy of the concatenated argv strings that were initialized in load(). More...
 
bool has (BooleanOptionKey const &key) const
 Is there an option with a BooleanOptionKey? More...
 
bool has (IntegerOptionKey const &key) const
 Is there an option with an IntegerOptionKey? More...
 
bool has (RealOptionKey const &key) const
 Is there an option with a RealOptionKey? More...
 
bool has (StringOptionKey const &key) const
 Is there an option with a StringOptionKey? More...
 
bool has (FileOptionKey const &key) const
 Is there an option with a FileOptionKey? More...
 
bool has (PathOptionKey const &key) const
 Is there an option with a PathOptionKey? More...
 
bool has (AnyOptionKey const &key) const
 Is there an option with an AnyOptionKey? More...
 
bool has (BooleanVectorOptionKey const &key) const
 Is there an option with a BooleanVectorOptionKey? More...
 
bool has (IntegerVectorOptionKey const &key) const
 Is there an option with an IntegerVectorOptionKey? More...
 
bool has (RealVectorOptionKey const &key) const
 Is there an option with a RealVectorOptionKey? More...
 
bool has (ResidueChainVectorOptionKey const &key) const
 Is there an option with an IntegerVectorOptionKey? More...
 
bool has (StringVectorOptionKey const &key) const
 Is there an option with a StringVectorOptionKey? More...
 
bool has (FileVectorOptionKey const &key) const
 Is there an option with a FileVectorOptionKey? More...
 
bool has (PathVectorOptionKey const &key) const
 Is there an option with a PathVectorOptionKey? More...
 
bool has (AnyVectorOptionKey const &key) const
 Is there an option with an AnyVectorOptionKey? More...
 
bool has (OptionKey const &key) const
 Is there an option with an OptionKey? More...
 
BooleanOption const & option (BooleanOptionKey const &key) const
 Option by BooleanOptionKey. More...
 
BooleanOptionoption (BooleanOptionKey const &key)
 Option by BooleanOptionKey. More...
 
IntegerOption const & option (IntegerOptionKey const &key) const
 Option by IntegerOptionKey. More...
 
IntegerOptionoption (IntegerOptionKey const &key)
 Option by IntegerOptionKey. More...
 
RealOption const & option (RealOptionKey const &key) const
 Option by RealOptionKey. More...
 
RealOptionoption (RealOptionKey const &key)
 Option by RealOptionKey. More...
 
StringOption const & option (StringOptionKey const &key) const
 Option by StringOptionKey. More...
 
StringOptionoption (StringOptionKey const &key)
 Option by StringOptionKey. More...
 
FileOption const & option (FileOptionKey const &key) const
 Option by FileOptionKey. More...
 
FileOptionoption (FileOptionKey const &key)
 Option by FileOptionKey. More...
 
PathOption const & option (PathOptionKey const &key) const
 Option by PathOptionKey. More...
 
PathOptionoption (PathOptionKey const &key)
 Option by PathOptionKey. More...
 
Option const & option (AnyOptionKey const &key) const
 Option by AnyOptionKey. More...
 
Optionoption (AnyOptionKey const &key)
 Option by AnyOptionKey. More...
 
template<typename OptionType >
OptionType const & option (AnyOptionKey const &key) const
 Option by AnyOptionKey with option type template argument. More...
 
template<typename OptionType >
OptionType & option (AnyOptionKey const &key)
 Option by AnyOptionKey with option type template argument. More...
 
BooleanVectorOption const & option (BooleanVectorOptionKey const &key) const
 VectorOption by BooleanVectorOptionKey. More...
 
BooleanVectorOptionoption (BooleanVectorOptionKey const &key)
 VectorOption by BooleanVectorOptionKey. More...
 
IntegerVectorOption const & option (IntegerVectorOptionKey const &key) const
 VectorOption by IntegerVectorOptionKey. More...
 
IntegerVectorOptionoption (IntegerVectorOptionKey const &key)
 VectorOption by IntegerVectorOptionKey. More...
 
RealVectorOption const & option (RealVectorOptionKey const &key) const
 VectorOption by RealVectorOptionKey. More...
 
RealVectorOptionoption (RealVectorOptionKey const &key)
 VectorOption by RealVectorOptionKey. More...
 
StringVectorOption const & option (StringVectorOptionKey const &key) const
 VectorOption by StringVectorOptionKey. More...
 
StringVectorOptionoption (StringVectorOptionKey const &key)
 VectorOption by StringVectorOptionKey. More...
 
FileVectorOption const & option (FileVectorOptionKey const &key) const
 VectorOption by FileVectorOptionKey. More...
 
FileVectorOptionoption (FileVectorOptionKey const &key)
 VectorOption by FileVectorOptionKey. More...
 
PathVectorOption const & option (PathVectorOptionKey const &key) const
 VectorOption by PathVectorOptionKey. More...
 
PathVectorOptionoption (PathVectorOptionKey const &key)
 VectorOption by PathVectorOptionKey. More...
 
VectorOption const & option (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey. More...
 
VectorOptionoption (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey. More...
 
template<typename VectorOptionType >
VectorOptionType const & option (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey with option type template argument. More...
 
template<typename VectorOptionType >
VectorOptionType & option (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey with option type template argument. More...
 
Option const & option (OptionKey const &key) const
 Option by OptionKey. More...
 
Optionoption (OptionKey const &key)
 Option by OptionKey. More...
 
template<typename OptionType >
OptionType const & option (OptionKey const &key) const
 Option by OptionKey with option type template argument. More...
 
template<typename OptionType >
OptionType & option (OptionKey const &key)
 Option by OptionKey with option type template argument. More...
 
BooleanOption const & operator[] (BooleanOptionKey const &key) const
 OptionCollection[ BooleanOptionKey ]. More...
 
BooleanOptionoperator[] (BooleanOptionKey const &key)
 OptionCollection[ BooleanOptionKey ]. More...
 
IntegerOption const & operator[] (IntegerOptionKey const &key) const
 OptionCollection[ IntegerOptionKey ]. More...
 
IntegerOptionoperator[] (IntegerOptionKey const &key)
 OptionCollection[ IntegerOptionKey ]. More...
 
RealOption const & operator[] (RealOptionKey const &key) const
 OptionCollection[ RealOptionKey ]. More...
 
RealOptionoperator[] (RealOptionKey const &key)
 OptionCollection[ RealOptionKey ]. More...
 
StringOption const & operator[] (StringOptionKey const &key) const
 OptionCollection[ StringOptionKey ]. More...
 
StringOptionoperator[] (StringOptionKey const &key)
 OptionCollection[ StringOptionKey ]. More...
 
FileOption const & operator[] (FileOptionKey const &key) const
 OptionCollection[ FileOptionKey ]. More...
 
FileOptionoperator[] (FileOptionKey const &key)
 OptionCollection[ FileOptionKey ]. More...
 
PathOption const & operator[] (PathOptionKey const &key) const
 OptionCollection[ PathOptionKey ]. More...
 
PathOptionoperator[] (PathOptionKey const &key)
 OptionCollection[ PathOptionKey ]. More...
 
Option const & operator[] (AnyOptionKey const &key) const
 OptionCollection[ AnyOptionKey ]. More...
 
Optionoperator[] (AnyOptionKey const &key)
 OptionCollection[ AnyOptionKey ]. More...
 
template<typename OptionType >
OptionType const & operator[] (AnyOptionKey const &key) const
 OptionCollection[ AnyOptionKey ] with option type template argument. More...
 
template<typename OptionType >
OptionType & operator[] (AnyOptionKey const &key)
 OptionCollection[ AnyOptionKey ] with option type template argument. More...
 
BooleanVectorOption const & operator[] (BooleanVectorOptionKey const &key) const
 OptionCollection[ BooleanVectorOptionKey ]. More...
 
BooleanVectorOptionoperator[] (BooleanVectorOptionKey const &key)
 OptionCollection[ BooleanVectorOptionKey ]. More...
 
IntegerVectorOption const & operator[] (IntegerVectorOptionKey const &key) const
 OptionCollection[ IntegerVectorOptionKey ]. More...
 
IntegerVectorOptionoperator[] (IntegerVectorOptionKey const &key)
 OptionCollection[ IntegerVectorOptionKey ]. More...
 
RealVectorOption const & operator[] (RealVectorOptionKey const &key) const
 OptionCollection[ RealVectorOptionKey ]. More...
 
RealVectorOptionoperator[] (RealVectorOptionKey const &key)
 OptionCollection[ RealVectorOptionKey ]. More...
 
ResidueChainVectorOption const & operator[] (ResidueChainVectorOptionKey const &key) const
 OptionCollection[ ResidueChainVectorOptionKey ]. More...
 
ResidueChainVectorOptionoperator[] (ResidueChainVectorOptionKey const &key)
 OptionCollection[ ResidueChainVectorOptionKey ]. More...
 
StringVectorOption const & operator[] (StringVectorOptionKey const &key) const
 OptionCollection[ StringVectorOptionKey ]. More...
 
StringVectorOptionoperator[] (StringVectorOptionKey const &key)
 OptionCollection[ StringVectorOptionKey ]. More...
 
FileVectorOption const & operator[] (FileVectorOptionKey const &key) const
 OptionCollection[ FileVectorOptionKey ]. More...
 
FileVectorOptionoperator[] (FileVectorOptionKey const &key)
 OptionCollection[ FileVectorOptionKey ]. More...
 
PathVectorOption const & operator[] (PathVectorOptionKey const &key) const
 OptionCollection[ PathVectorOptionKey ]. More...
 
PathVectorOptionoperator[] (PathVectorOptionKey const &key)
 OptionCollection[ PathVectorOptionKey ]. More...
 
VectorOption const & operator[] (AnyVectorOptionKey const &key) const
 OptionCollection[ AnyVectorOptionKey ]. More...
 
VectorOptionoperator[] (AnyVectorOptionKey const &key)
 OptionCollection[ AnyVectorOptionKey ]. More...
 
template<typename VectorOptionType >
VectorOptionType const & operator[] (AnyVectorOptionKey const &key) const
 OptionCollection[ AnyVectorOptionKey ] with option type template argument. More...
 
template<typename VectorOptionType >
VectorOptionType & operator[] (AnyVectorOptionKey const &key)
 OptionCollection[ AnyVectorOptionKey ] with option type template argument. More...
 
Option const & operator[] (OptionKey const &key) const
 OptionCollection[ OptionKey ]. More...
 
Optionoperator[] (OptionKey const &key)
 OptionCollection[ OptionKey ]. More...
 
template<typename OptionType >
OptionType const & operator[] (OptionKey const &key) const
 OptionCollection[ OptionKey ] with option type template argument. More...
 
template<typename OptionType >
OptionType & operator[] (OptionKey const &key)
 OptionCollection[ OptionKey ] with option type template argument. More...
 
BooleanOption const & operator() (BooleanOptionKey const &key, bool check_restricted_access=true) const
 Option by BooleanOptionKey. More...
 
BooleanOptionoperator() (BooleanOptionKey const &key, bool check_restricted_access=true)
 Option by BooleanOptionKey. More...
 
IntegerOption const & operator() (IntegerOptionKey const &key, bool check_restricted_access=true) const
 Option by IntegerOptionKey. More...
 
IntegerOptionoperator() (IntegerOptionKey const &key, bool check_restricted_access=true)
 Option by IntegerOptionKey. More...
 
RealOption const & operator() (RealOptionKey const &key, bool check_restricted_access=true) const
 Option by RealOptionKey. More...
 
RealOptionoperator() (RealOptionKey const &key, bool check_restricted_access=true)
 Option by RealOptionKey. More...
 
StringOption const & operator() (StringOptionKey const &key, bool check_restricted_access=true) const
 Option by StringOptionKey. More...
 
StringOptionoperator() (StringOptionKey const &key, bool check_restricted_access=true)
 Option by StringOptionKey. More...
 
FileOption const & operator() (FileOptionKey const &key, bool check_restricted_access=true) const
 Option by FileOptionKey. More...
 
FileOptionoperator() (FileOptionKey const &key, bool check_restricted_access=true)
 Option by FileOptionKey. More...
 
PathOption const & operator() (PathOptionKey const &key, bool check_restricted_access=true) const
 Option by PathOptionKey. More...
 
PathOptionoperator() (PathOptionKey const &key, bool check_restricted_access=true)
 Option by PathOptionKey. More...
 
Option const & operator() (AnyOptionKey const &key, bool check_restricted_access=true) const
 Option by AnyOptionKey. More...
 
Optionoperator() (AnyOptionKey const &key, bool check_restricted_access=true)
 Option by AnyOptionKey. More...
 
template<typename OptionType >
OptionType const & operator() (AnyOptionKey const &key, bool check_restricted_access=true) const
 Option by AnyOptionKey with option type template argument. More...
 
template<typename OptionType >
OptionType & operator() (AnyOptionKey const &key, bool check_restricted_access=true)
 Option by AnyOptionKey with option type template argument. More...
 
BooleanVectorOption const & operator() (BooleanVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by BooleanVectorOptionKey. More...
 
BooleanVectorOptionoperator() (BooleanVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by BooleanVectorOptionKey. More...
 
IntegerVectorOption const & operator() (IntegerVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by IntegerVectorOptionKey. More...
 
IntegerVectorOptionoperator() (IntegerVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by IntegerVectorOptionKey. More...
 
RealVectorOption const & operator() (RealVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by RealVectorOptionKey. More...
 
RealVectorOptionoperator() (RealVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by RealVectorOptionKey. More...
 
ResidueChainVectorOption const & operator() (ResidueChainVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by ResidueChainVectorOptionKey. More...
 
ResidueChainVectorOptionoperator() (ResidueChainVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by ResidueChainVectorOptionKey. More...
 
StringVectorOption const & operator() (StringVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by StringVectorOptionKey. More...
 
StringVectorOptionoperator() (StringVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by StringVectorOptionKey. More...
 
FileVectorOption const & operator() (FileVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by FileVectorOptionKey. More...
 
FileVectorOptionoperator() (FileVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by FileVectorOptionKey. More...
 
PathVectorOption const & operator() (PathVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by PathVectorOptionKey. More...
 
PathVectorOptionoperator() (PathVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by PathVectorOptionKey. More...
 
VectorOption const & operator() (AnyVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by AnyVectorOptionKey. More...
 
VectorOptionoperator() (AnyVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by AnyVectorOptionKey. More...
 
template<typename VectorOptionType >
VectorOptionType const & operator() (AnyVectorOptionKey const &key, bool check_restricted_access=true) const
 VectorOption by AnyVectorOptionKey with option type template argument. More...
 
template<typename VectorOptionType >
VectorOptionType & operator() (AnyVectorOptionKey const &key, bool check_restricted_access=true)
 VectorOption by AnyVectorOptionKey with option type template argument. More...
 
Option const & operator() (OptionKey const &key, bool check_restricted_access=true) const
 Option by OptionKey. More...
 
Optionoperator() (OptionKey const &key, bool check_restricted_access=true)
 Option by OptionKey. More...
 
template<typename OptionType >
OptionType const & operator() (OptionKey const &key, bool check_restricted_access=true) const
 Option by OptionKey with option type template argument. More...
 
template<typename OptionType >
OptionType & operator() (OptionKey const &key, bool check_restricted_access=true)
 Option by OptionKey with option type template argument. More...
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
virtual ~ReferenceCount ()
 

Static Public Member Functions

static void add_relevant (const OptionKey &key)
 add OptionKey to list of application relevant options More...
 
static bool is_relevant (OptionKey const &key)
 Checks if option has been registered as relevant. More...
 
static std::string space_prefixed (std::string const &s, int const n=1)
 Space-prefixed string except blank if string is empty. More...
 
static std::string tab_prefixed (std::string const &s, int const n=1)
 Tab-prefixed string except blank if string is empty. More...
 
static void check_key (OptionKey const &key)
 Check that a key's identifiers are legal. More...
 
static void check_key (Option const &option)
 Check that an option's identifiers are legal. More...
 
static std::string lower_no_under (std::string const &instring)
 Remove underscores and lowercase string. More...
 
static void add_edits (std::set< std::string > &items)
 Add to the set possible typos for a given word. More...
 
static std::string find_key_cl (std::string const &key_string, std::string const &cid, bool const top)
 Find a user-specified option key in a command line context. More...
 
static std::string find_key_file (std::string const &key_string, std::string const &cid, bool const top)
 
static std::string::size_type n_part (std::string const &s)
 Number of parts in an option id. More...
 
static std::string::size_type n_part_prefix_match (std::string const &s, std::string const &t)
 Number of prefix parts of two ids that match. More...
 
static std::string prefix (std::string const &s, int const n=1)
 Prefix of an option id with a specified number of parts. More...
 
static std::string suffix (std::string const &s, int const n=1)
 Suffix of an option id with a specified number of parts. More...
 
static std::string & trim (std::string &s, int const n=1)
 Trim a specified number of parts from the suffix of an option id. More...
 
static std::string trimmed (std::string const &s, int const n=1)
 Prefix of an option id with a specified number of suffix parts removed. More...
 
static std::string cleaned (std::string const &s)
 Cleaned option id with repeat colons condensed. More...
 
static std::string merged (std::string const &s, std::string const &t)
 Merged option ids with the minimal suffix-prefix overlap, if any, removed. More...
 
static std::string wrapped (std::string const &s, std::string::size_type indent=10, std::string::size_type width=80, std::string const &header_for_extra_lines="")
 String wrapped and indented. More...
 
static void set_show_accessed_options_flag (bool v)
 modify 'show_accessed_options' flag; More...
 
static void set_show_unused_options_flag (bool v)
 modify 'show_unused_options' flag; More...
 

Private Types

typedef std::list< std::string > ValueStrings
 
typedef
utility::keys::SmallKeyVector
< BooleanOptionKey,
BooleanOption
Booleans
 
typedef
utility::keys::SmallKeyVector
< IntegerOptionKey,
IntegerOption
Integers
 
typedef
utility::keys::SmallKeyVector
< RealOptionKey, RealOption
Reals
 
typedef
utility::keys::SmallKeyVector
< StringOptionKey,
StringOption
Strings
 
typedef
utility::keys::SmallKeyVector
< FileOptionKey, FileOption
Files
 
typedef
utility::keys::SmallKeyVector
< PathOptionKey, PathOption
Paths
 
typedef
utility::keys::SmallKeyVector
< AnyOptionKey, VariantOption
< ScalarOption > > 
Anys
 
typedef
utility::keys::SmallKeyVector
< BooleanVectorOptionKey,
BooleanVectorOption
BooleanVectors
 
typedef
utility::keys::SmallKeyVector
< IntegerVectorOptionKey,
IntegerVectorOption
IntegerVectors
 
typedef
utility::keys::SmallKeyVector
< RealVectorOptionKey,
RealVectorOption
RealVectors
 
typedef
utility::keys::SmallKeyVector
< ResidueChainVectorOptionKey,
ResidueChainVectorOption
ResidueChainVectors
 
typedef
utility::keys::SmallKeyVector
< StringVectorOptionKey,
StringVectorOption
StringVectors
 
typedef
utility::keys::SmallKeyVector
< FileVectorOptionKey,
FileVectorOption
FileVectors
 
typedef
utility::keys::SmallKeyVector
< PathVectorOptionKey,
PathVectorOption
PathVectors
 
typedef
utility::keys::SmallKeyVector
< AnyVectorOptionKey,
VariantOption< VectorOption > > 
AnyVectors
 
typedef
utility::keys::SmallKeyVector
< OptionKey, OptionTypes
All
 

Private Member Functions

void load_option_cl (std::string const &arg_string, ValueStrings &arg_strings, std::string const &pid)
 Load a user-specified option argument from a command line. More...
 
void load_option_from_file (std::string const &arg_string, ValueStrings &arg_strings, std::string const &pid)
 Load one option from user specified file. More...
 
void load_option_file (std::string const &arg_string, ValueStrings &val_strings, std::string &cid, bool const cl_context=false)
 
void set_option_value_cl (std::string const &key_id, ValueStrings &arg_strings)
 Set a user-specified option value from a command line. More...
 
void set_option_value_file (std::string const &key_id, ValueStrings &val_strings)
 

Private Attributes

Booleans booleans_
 Boolean options. More...
 
Integers integers_
 Integer options. More...
 
Reals reals_
 Real options. More...
 
Strings strings_
 String options. More...
 
Files files_
 File options. More...
 
Paths paths_
 Path options. More...
 
Anys anys_
 Any value type options. More...
 
BooleanVectors boolean_vectors_
 Boolean vector options. More...
 
IntegerVectors integer_vectors_
 Integer vector options. More...
 
RealVectors real_vectors_
 Real vector options. More...
 
ResidueChainVectors residue_chain_vectors_
 Residue/chain vector options. More...
 
StringVectors string_vectors_
 String vector options. More...
 
FileVectors file_vectors_
 File vector options. More...
 
PathVectors path_vectors_
 Path vector options. More...
 
AnyVectors any_vectors_
 Any value type vector options. More...
 
All all_
 All options (non-owning pointers) More...
 
std::string argv_copy_
 keep a copy of argv around in case people want to get at it elsewhere in the code. More...
 

Static Private Attributes

static std::vector< OptionKey
const * > 
relevant_
 global list of application relevant options More...
 
static bool show_accessed_options_ = false
 Flag indicating that list of accessed option should be printed when destructor of OptionCollection is called. This flag is false by default. More...
 
static bool show_unused_options_ = false
 Flag indicating that list of user specified but inaccessed options should be printed when destructor of OptionCollection is called. This flag is false by default. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, OptionCollection const &options)
 Output to stream. More...
 

Additional Inherited Members

- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 

Detailed Description

Program options collection.

Member Typedef Documentation

Constructor & Destructor Documentation

utility::options::OptionCollection::OptionCollection ( )
inline

Default constructor.

utility::options::OptionCollection::~OptionCollection ( )
override

Member Function Documentation

BooleanOption& utility::options::OptionCollection::add ( BooleanOptionKey const &  key,
std::string const &  description 
)
inline
IntegerOption& utility::options::OptionCollection::add ( IntegerOptionKey const &  key,
std::string const &  description 
)
inline
RealOption& utility::options::OptionCollection::add ( RealOptionKey const &  key,
std::string const &  description 
)
inline
StringOption& utility::options::OptionCollection::add ( StringOptionKey const &  key,
std::string const &  description 
)
inline
FileOption& utility::options::OptionCollection::add ( FileOptionKey const &  key,
std::string const &  description 
)
inline
PathOption& utility::options::OptionCollection::add ( PathOptionKey const &  key,
std::string const &  description 
)
inline
BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOptionKey const &  key,
std::string const &  description 
)
inline
IntegerVectorOption& utility::options::OptionCollection::add ( IntegerVectorOptionKey const &  key,
std::string const &  description 
)
inline
RealVectorOption& utility::options::OptionCollection::add ( RealVectorOptionKey const &  key,
std::string const &  description 
)
inline
ResidueChainVectorOption& utility::options::OptionCollection::add ( ResidueChainVectorOptionKey const &  key,
std::string const &  description 
)
inline
StringVectorOption& utility::options::OptionCollection::add ( StringVectorOptionKey const &  key,
std::string const &  description 
)
inline
FileVectorOption& utility::options::OptionCollection::add ( FileVectorOptionKey const &  key,
std::string const &  description 
)
inline
PathVectorOption& utility::options::OptionCollection::add ( PathVectorOptionKey const &  key,
std::string const &  description 
)
inline
BooleanOption& utility::options::OptionCollection::add ( BooleanOption const &  option)
inline
IntegerOption& utility::options::OptionCollection::add ( IntegerOption const &  option)
inline
RealOption& utility::options::OptionCollection::add ( RealOption const &  option)
inline
StringOption& utility::options::OptionCollection::add ( StringOption const &  option)
inline
FileOption& utility::options::OptionCollection::add ( FileOption const &  option)
inline
PathOption& utility::options::OptionCollection::add ( PathOption const &  option)
inline
template<typename T >
AnyOption< T >& utility::options::OptionCollection::add ( AnyOption< T > const &  option)
inline
BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOption const &  option)
inline
IntegerVectorOption& utility::options::OptionCollection::add ( IntegerVectorOption const &  option)
inline
RealVectorOption& utility::options::OptionCollection::add ( RealVectorOption const &  option)
inline
ResidueChainVectorOption& utility::options::OptionCollection::add ( ResidueChainVectorOption const &  option)
inline
StringVectorOption& utility::options::OptionCollection::add ( StringVectorOption const &  option)
inline
FileVectorOption& utility::options::OptionCollection::add ( FileVectorOption const &  option)
inline
PathVectorOption& utility::options::OptionCollection::add ( PathVectorOption const &  option)
inline
template<typename T >
AnyVectorOption< T >& utility::options::OptionCollection::add ( AnyVectorOption< T > const &  option)
inline
void utility::options::OptionCollection::add_built_in_options ( )
void utility::options::OptionCollection::add_edits ( std::set< std::string > &  items)
static

Add to the set possible typos for a given word.

These are strings with Levenshtein distance of 1

References test.T200_Scoring::ii, and ObjexxFCL::transposed().

Referenced by find_key_cl().

static void utility::options::OptionCollection::add_relevant ( const OptionKey key)
inlinestatic

add OptionKey to list of application relevant options

References relevant_.

Referenced by main(), and register_options().

void utility::options::OptionCollection::check_key ( OptionKey const &  key)
static
void utility::options::OptionCollection::check_key ( Option const &  option)
static
void utility::options::OptionCollection::check_specs ( ) const
void utility::options::OptionCollection::check_values ( ) const
std::string utility::options::OptionCollection::cleaned ( std::string const &  s)
static

Cleaned option id with repeat colons condensed.

References test.T009_Exceptions::e, and basic::options::OptionKeys::in::file::t.

Referenced by load_option_cl(), load_option_file(), and merged().

std::string utility::options::OptionCollection::find_key_cl ( std::string const &  key_string,
std::string const &  cid,
bool const  top 
)
static
std::string utility::options::OptionCollection::find_key_file ( std::string const &  key_string,
std::string const &  cid,
bool const  top 
)
static

References CREATE_EXCEPTION, has, and merged().

Referenced by load_option_file().

std::string utility::options::OptionCollection::get_argv ( ) const

Returns a copy of the concatenated argv strings that were initialized in load().

References argv_copy_.

bool utility::options::OptionCollection::has ( BooleanOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( IntegerOptionKey const &  key) const
inline

Is there an option with an IntegerOptionKey?

References utility::keys::SmallKeyVector< K, T >::has(), and integers_.

bool utility::options::OptionCollection::has ( RealOptionKey const &  key) const
inline

Is there an option with a RealOptionKey?

References utility::keys::SmallKeyVector< K, T >::has(), and reals_.

bool utility::options::OptionCollection::has ( StringOptionKey const &  key) const
inline

Is there an option with a StringOptionKey?

References utility::keys::SmallKeyVector< K, T >::has(), and strings_.

bool utility::options::OptionCollection::has ( FileOptionKey const &  key) const
inline

Is there an option with a FileOptionKey?

References files_, and utility::keys::SmallKeyVector< K, T >::has().

bool utility::options::OptionCollection::has ( PathOptionKey const &  key) const
inline

Is there an option with a PathOptionKey?

References utility::keys::SmallKeyVector< K, T >::has(), and paths_.

bool utility::options::OptionCollection::has ( AnyOptionKey const &  key) const
inline

Is there an option with an AnyOptionKey?

References anys_, and utility::keys::SmallKeyVector< K, T >::has().

bool utility::options::OptionCollection::has ( BooleanVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( IntegerVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( RealVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( ResidueChainVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( StringVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( FileVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( PathVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( AnyVectorOptionKey const &  key) const
inline
bool utility::options::OptionCollection::has ( OptionKey const &  key) const
inline

Is there an option with an OptionKey?

References all_, and utility::keys::SmallKeyVector< K, T >::has().

bool utility::options::OptionCollection::is_relevant ( OptionKey const &  key)
static

Checks if option has been registered as relevant.

Checks is option has been registered as relevant.

References utility::keys::AutoKey< O, S, C >::id(), and relevant_.

Referenced by find_key_cl().

void utility::options::OptionCollection::load ( const std::vector< std::string > &  args,
bool const  free_args 
)

Load the user-specified option values.

References fmt::arg(), and argv_copy_.

Referenced by load().

void utility::options::OptionCollection::load ( int const  argc,
char *const  argv[],
bool const  free_args = false 
)

Load the user-specified option values.

References argv_copy_, load(), and erraser_analysis::temp.

void utility::options::OptionCollection::load ( std::string  executable_name,
ValueStrings arg_strings,
bool const  free_args 
)
void utility::options::OptionCollection::load_option_cl ( std::string const &  arg_string,
ValueStrings arg_strings,
std::string const &  pid 
)
private

Load a user-specified option argument from a command line.

References cleaned(), CREATE_EXCEPTION, find_key_cl(), set_option_value_cl(), ObjexxFCL::stripped_whitespace(), and top.

Referenced by load(), and load_option_from_file().

void utility::options::OptionCollection::load_option_file ( std::string const &  arg_string,
ValueStrings val_strings,
std::string &  cid,
bool const  cl_context = false 
)
private
void utility::options::OptionCollection::load_option_from_file ( std::string const &  arg_string,
ValueStrings arg_strings,
std::string const &  pid 
)
private

Load one option from user specified file.

References CREATE_EXCEPTION, ObjexxFCL::getline(), load_option_cl(), utility::excn::Exception::msg(), res, and utility::split_to_list().

Referenced by load(), and load_option_file().

void utility::options::OptionCollection::load_options_from_file ( std::string const &  file_string,
std::string const &  cid = "" 
)
void utility::options::OptionCollection::load_options_from_file_exception ( std::string const &  file_string,
std::string const &  cid = "" 
)

same as load_options_from_file, but throws exception instead of call to std::exit

Load all options in a flags file.

References CREATE_EXCEPTION, and load_options_from_stream().

Referenced by load_options_from_file().

void utility::options::OptionCollection::load_options_from_stream ( std::istream &  stream,
std::string const &  file_string = "STREAM",
std::string const &  cid = "",
bool  print_lines = false 
)
std::string utility::options::OptionCollection::lower_no_under ( std::string const &  instring)
static

Remove underscores and lowercase string.

References ObjexxFCL::lowercased().

Referenced by find_key_cl().

std::string utility::options::OptionCollection::merged ( std::string const &  s,
std::string const &  t 
)
static

Merged option ids with the minimal suffix-prefix overlap, if any, removed.

References cleaned(), min(), n_part(), basic::options::OptionKeys::out::file::o, prefix(), suffix(), basic::options::OptionKeys::in::file::t, and trimmed().

Referenced by find_key_cl(), and find_key_file().

std::string::size_type utility::options::OptionCollection::n_part ( std::string const &  s)
static
std::string::size_type utility::options::OptionCollection::n_part_prefix_match ( std::string const &  s,
std::string const &  t 
)
static

Number of prefix parts of two ids that match.

References min(), n_part(), and prefix().

Referenced by find_key_cl().

BooleanOption const& utility::options::OptionCollection::operator() ( BooleanOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
BooleanOption& utility::options::OptionCollection::operator() ( BooleanOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
IntegerOption const& utility::options::OptionCollection::operator() ( IntegerOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
IntegerOption& utility::options::OptionCollection::operator() ( IntegerOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
RealOption const& utility::options::OptionCollection::operator() ( RealOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
RealOption& utility::options::OptionCollection::operator() ( RealOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
StringOption const& utility::options::OptionCollection::operator() ( StringOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
StringOption& utility::options::OptionCollection::operator() ( StringOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
FileOption const& utility::options::OptionCollection::operator() ( FileOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
FileOption& utility::options::OptionCollection::operator() ( FileOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
PathOption const& utility::options::OptionCollection::operator() ( PathOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
PathOption& utility::options::OptionCollection::operator() ( PathOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
Option const& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
Option& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
template<typename OptionType >
OptionType const& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

Option by AnyOptionKey with option type template argument.

References anys_, and option().

template<typename OptionType >
OptionType& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

Option by AnyOptionKey with option type template argument.

References anys_, and option().

BooleanVectorOption const& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
BooleanVectorOption& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
IntegerVectorOption const& utility::options::OptionCollection::operator() ( IntegerVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
IntegerVectorOption& utility::options::OptionCollection::operator() ( IntegerVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
RealVectorOption const& utility::options::OptionCollection::operator() ( RealVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
RealVectorOption& utility::options::OptionCollection::operator() ( RealVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
ResidueChainVectorOption const& utility::options::OptionCollection::operator() ( ResidueChainVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
ResidueChainVectorOption& utility::options::OptionCollection::operator() ( ResidueChainVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
StringVectorOption const& utility::options::OptionCollection::operator() ( StringVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
StringVectorOption& utility::options::OptionCollection::operator() ( StringVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
FileVectorOption const& utility::options::OptionCollection::operator() ( FileVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
FileVectorOption& utility::options::OptionCollection::operator() ( FileVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
PathVectorOption const& utility::options::OptionCollection::operator() ( PathVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
PathVectorOption& utility::options::OptionCollection::operator() ( PathVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
VectorOption const& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
VectorOption& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline
template<typename VectorOptionType >
VectorOptionType const& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

VectorOption by AnyVectorOptionKey with option type template argument.

References any_vectors_, and option().

template<typename VectorOptionType >
VectorOptionType& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

VectorOption by AnyVectorOptionKey with option type template argument.

References any_vectors_, and option().

Option const& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
) const
inline
Option& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
)
inline
template<typename OptionType >
OptionType const& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

Option by OptionKey with option type template argument.

References utility::down_cast(), and key.

template<typename OptionType >
OptionType& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
)
inline

Option by OptionKey with option type template argument.

References utility::down_cast(), and key.

BooleanOption const& utility::options::OptionCollection::operator[] ( BooleanOptionKey const &  key) const
inline
BooleanOption& utility::options::OptionCollection::operator[] ( BooleanOptionKey const &  key)
inline
IntegerOption const& utility::options::OptionCollection::operator[] ( IntegerOptionKey const &  key) const
inline
IntegerOption& utility::options::OptionCollection::operator[] ( IntegerOptionKey const &  key)
inline
RealOption const& utility::options::OptionCollection::operator[] ( RealOptionKey const &  key) const
inline
RealOption& utility::options::OptionCollection::operator[] ( RealOptionKey const &  key)
inline
StringOption const& utility::options::OptionCollection::operator[] ( StringOptionKey const &  key) const
inline
StringOption& utility::options::OptionCollection::operator[] ( StringOptionKey const &  key)
inline
FileOption const& utility::options::OptionCollection::operator[] ( FileOptionKey const &  key) const
inline
FileOption& utility::options::OptionCollection::operator[] ( FileOptionKey const &  key)
inline
PathOption const& utility::options::OptionCollection::operator[] ( PathOptionKey const &  key) const
inline
PathOption& utility::options::OptionCollection::operator[] ( PathOptionKey const &  key)
inline
Option const& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key) const
inline
Option& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key)
inline
template<typename OptionType >
OptionType const& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key) const
inline

OptionCollection[ AnyOptionKey ] with option type template argument.

References anys_, and option().

template<typename OptionType >
OptionType& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key)
inline

OptionCollection[ AnyOptionKey ] with option type template argument.

References anys_, and option().

BooleanVectorOption const& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key) const
inline
BooleanVectorOption& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key)
inline
IntegerVectorOption const& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key) const
inline
IntegerVectorOption& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key)
inline
RealVectorOption const& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key) const
inline
RealVectorOption& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key)
inline
ResidueChainVectorOption const& utility::options::OptionCollection::operator[] ( ResidueChainVectorOptionKey const &  key) const
inline
ResidueChainVectorOption& utility::options::OptionCollection::operator[] ( ResidueChainVectorOptionKey const &  key)
inline
StringVectorOption const& utility::options::OptionCollection::operator[] ( StringVectorOptionKey const &  key) const
inline
StringVectorOption& utility::options::OptionCollection::operator[] ( StringVectorOptionKey const &  key)
inline
FileVectorOption const& utility::options::OptionCollection::operator[] ( FileVectorOptionKey const &  key) const
inline
FileVectorOption& utility::options::OptionCollection::operator[] ( FileVectorOptionKey const &  key)
inline
PathVectorOption const& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key) const
inline
PathVectorOption& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key)
inline
VectorOption const& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key) const
inline
VectorOption& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key)
inline
template<typename VectorOptionType >
VectorOptionType const& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key) const
inline

OptionCollection[ AnyVectorOptionKey ] with option type template argument.

References any_vectors_, and option().

template<typename VectorOptionType >
VectorOptionType& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key)
inline

OptionCollection[ AnyVectorOptionKey ] with option type template argument.

References any_vectors_, and option().

Option const& utility::options::OptionCollection::operator[] ( OptionKey const &  key) const
inline
Option& utility::options::OptionCollection::operator[] ( OptionKey const &  key)
inline
template<typename OptionType >
OptionType const& utility::options::OptionCollection::operator[] ( OptionKey const &  key) const
inline

OptionCollection[ OptionKey ] with option type template argument.

References utility::down_cast(), and operator[]().

template<typename OptionType >
OptionType& utility::options::OptionCollection::operator[] ( OptionKey const &  key)
inline

OptionCollection[ OptionKey ] with option type template argument.

References utility::down_cast(), and operator[]().

BooleanOption const& utility::options::OptionCollection::option ( BooleanOptionKey const &  key) const
inline
BooleanOption& utility::options::OptionCollection::option ( BooleanOptionKey const &  key)
inline
IntegerOption const& utility::options::OptionCollection::option ( IntegerOptionKey const &  key) const
inline
IntegerOption& utility::options::OptionCollection::option ( IntegerOptionKey const &  key)
inline
RealOption const& utility::options::OptionCollection::option ( RealOptionKey const &  key) const
inline
RealOption& utility::options::OptionCollection::option ( RealOptionKey const &  key)
inline
StringOption const& utility::options::OptionCollection::option ( StringOptionKey const &  key) const
inline
StringOption& utility::options::OptionCollection::option ( StringOptionKey const &  key)
inline
FileOption const& utility::options::OptionCollection::option ( FileOptionKey const &  key) const
inline
FileOption& utility::options::OptionCollection::option ( FileOptionKey const &  key)
inline
PathOption const& utility::options::OptionCollection::option ( PathOptionKey const &  key) const
inline
PathOption& utility::options::OptionCollection::option ( PathOptionKey const &  key)
inline
Option const& utility::options::OptionCollection::option ( AnyOptionKey const &  key) const
inline

Option by AnyOptionKey.

References operator[]().

Option& utility::options::OptionCollection::option ( AnyOptionKey const &  key)
inline

Option by AnyOptionKey.

References operator[]().

template<typename OptionType >
OptionType const& utility::options::OptionCollection::option ( AnyOptionKey const &  key) const
inline

Option by AnyOptionKey with option type template argument.

References key.

template<typename OptionType >
OptionType& utility::options::OptionCollection::option ( AnyOptionKey const &  key)
inline

Option by AnyOptionKey with option type template argument.

References key.

BooleanVectorOption const& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key) const
inline
BooleanVectorOption& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key)
inline
IntegerVectorOption const& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key) const
inline
IntegerVectorOption& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key)
inline
RealVectorOption const& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key) const
inline
RealVectorOption& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key)
inline
StringVectorOption const& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key) const
inline
StringVectorOption& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key)
inline
FileVectorOption const& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key) const
inline
FileVectorOption& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key)
inline
PathVectorOption const& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key) const
inline
PathVectorOption& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key)
inline
VectorOption const& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) const
inline
VectorOption& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key)
inline
template<typename VectorOptionType >
VectorOptionType const& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) const
inline

VectorOption by AnyVectorOptionKey with option type template argument.

References key.

template<typename VectorOptionType >
VectorOptionType& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key)
inline

VectorOption by AnyVectorOptionKey with option type template argument.

References key.

Option const& utility::options::OptionCollection::option ( OptionKey const &  key) const
inline

Option by OptionKey.

References operator[]().

Option& utility::options::OptionCollection::option ( OptionKey const &  key)
inline

Option by OptionKey.

References operator[]().

template<typename OptionType >
OptionType const& utility::options::OptionCollection::option ( OptionKey const &  key) const
inline

Option by OptionKey with option type template argument.

References key.

template<typename OptionType >
OptionType& utility::options::OptionCollection::option ( OptionKey const &  key)
inline

Option by OptionKey with option type template argument.

References key.

std::string utility::options::OptionCollection::prefix ( std::string const &  s,
int const  n = 1 
)
static
void utility::options::OptionCollection::set_option_value_cl ( std::string const &  key_id,
ValueStrings arg_strings 
)
private

Set a user-specified option value from a command line.

Set a user-specified option value from a command line note Decides whether to use value strings and erases the ones used.

References utility::options::Option::can_hold_another(), utility::options::Option::cl_value(), CREATE_EXCEPTION, has, has(), utility::keys::AutoKey< O, S, C >::id(), ObjexxFCL::is_any_of(), utility::options::Option::is_cl_value(), key, option(), runtime_assert, utility::options::OptionKey::scalar(), and utility::options::OptionKey::vector().

Referenced by load_option_cl().

void utility::options::OptionCollection::set_option_value_file ( std::string const &  key_id,
ValueStrings val_strings 
)
private
static void utility::options::OptionCollection::set_show_accessed_options_flag ( bool  v)
inlinestatic

modify 'show_accessed_options' flag;

References show_accessed_options_, and test.T850_SubClassing::v.

static void utility::options::OptionCollection::set_show_unused_options_flag ( bool  v)
inlinestatic

modify 'show_unused_options' flag;

References show_unused_options_, and test.T850_SubClassing::v.

void utility::options::OptionCollection::show_accessed_options ( std::ostream &  stream) const
void utility::options::OptionCollection::show_all ( std::ostream &  stream) const
void utility::options::OptionCollection::show_all_hier ( std::ostream &  stream) const
void utility::options::OptionCollection::show_help ( std::ostream &  stream)
void utility::options::OptionCollection::show_help_hier ( std::ostream &  stream)
void utility::options::OptionCollection::show_inaccessed_user_options ( std::ostream &  stream) const
void utility::options::OptionCollection::show_option_help ( OptionKey const &  key,
std::string &  group,
std::ostream &  stream 
)
void utility::options::OptionCollection::show_option_help_hier ( OptionKey const &  key,
std::string &  group,
std::ostream &  stream 
)
void utility::options::OptionCollection::show_table_text ( std::ostream &  stream) const
void utility::options::OptionCollection::show_table_Wiki ( std::ostream &  stream) const
void utility::options::OptionCollection::show_unused_options ( std::ostream &  stream) const

Show options that were user-specified, but not yet accessed. Differs from show_inaccessed_user_options() mainly by formatting And how the options are accessed. (This one should be destructor safe.)

References utility::keys::SmallKeyVector< K, T >::begin(), boolean_vectors_, booleans_, utility::keys::SmallKeyVector< K, T >::end(), file_vectors_, files_, integer_vectors_, integers_, path_vectors_, paths_, real_vectors_, reals_, utility::options::show_unused_options_T(), string_vectors_, and strings_.

Referenced by ~OptionCollection().

void utility::options::OptionCollection::show_user ( std::ostream &  stream) const
static std::string utility::options::OptionCollection::space_prefixed ( std::string const &  s,
int const  n = 1 
)
inlinestatic

Space-prefixed string except blank if string is empty.

References basic::options::OptionKeys::in::file::s.

Referenced by show_option_help().

std::string utility::options::OptionCollection::suffix ( std::string const &  s,
int const  n = 1 
)
static

Suffix of an option id with a specified number of parts.

References n_part(), runtime_assert, and basic::options::OptionKeys::in::file::s.

Referenced by check_key(), find_key_cl(), merged(), show_all_hier(), show_option_help_hier(), show_table_text(), and show_table_Wiki().

static std::string utility::options::OptionCollection::tab_prefixed ( std::string const &  s,
int const  n = 1 
)
inlinestatic

Tab-prefixed string except blank if string is empty.

References basic::options::OptionKeys::in::file::s.

std::string & utility::options::OptionCollection::trim ( std::string &  s,
int const  n = 1 
)
static

Trim a specified number of parts from the suffix of an option id.

References n_part(), runtime_assert, and basic::options::OptionKeys::in::file::s.

Referenced by find_key_cl().

std::string utility::options::OptionCollection::trimmed ( std::string const &  s,
int const  n = 1 
)
static

Prefix of an option id with a specified number of suffix parts removed.

References n_part(), runtime_assert, and basic::options::OptionKeys::in::file::s.

Referenced by merged().

std::string utility::options::OptionCollection::wrapped ( std::string const &  s,
std::string::size_type  indent = 10,
std::string::size_type  width = 80,
std::string const &  header_for_extra_lines = "" 
)
static

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
OptionCollection const &  options 
)
friend

Output to stream.

Member Data Documentation

All utility::options::OptionCollection::all_
private

All options (non-owning pointers)

Referenced by add(), has(), operator()(), and operator[]().

AnyVectors utility::options::OptionCollection::any_vectors_
private

Any value type vector options.

Referenced by add(), has(), operator()(), and operator[]().

Anys utility::options::OptionCollection::anys_
private

Any value type options.

Referenced by add(), has(), operator()(), and operator[]().

std::string utility::options::OptionCollection::argv_copy_
private

keep a copy of argv around in case people want to get at it elsewhere in the code.

Referenced by get_argv(), and load().

BooleanVectors utility::options::OptionCollection::boolean_vectors_
private

Boolean vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Booleans utility::options::OptionCollection::booleans_
private
FileVectors utility::options::OptionCollection::file_vectors_
private

File vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Files utility::options::OptionCollection::files_
private
IntegerVectors utility::options::OptionCollection::integer_vectors_
private

Integer vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Integers utility::options::OptionCollection::integers_
private
PathVectors utility::options::OptionCollection::path_vectors_
private

Path vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Paths utility::options::OptionCollection::paths_
private
RealVectors utility::options::OptionCollection::real_vectors_
private

Real vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Reals utility::options::OptionCollection::reals_
private
std::vector< OptionKey const * > utility::options::OptionCollection::relevant_
staticprivate

global list of application relevant options

Referenced by add_relevant(), is_relevant(), show_help(), and show_help_hier().

ResidueChainVectors utility::options::OptionCollection::residue_chain_vectors_
private

Residue/chain vector options.

Referenced by add(), has(), operator()(), and operator[]().

bool utility::options::OptionCollection::show_accessed_options_ = false
staticprivate

Flag indicating that list of accessed option should be printed when destructor of OptionCollection is called. This flag is false by default.

Flag indicating that list of accessed option should be printed when destructor of OptionCollection is called.

Referenced by set_show_accessed_options_flag(), and ~OptionCollection().

bool utility::options::OptionCollection::show_unused_options_ = false
staticprivate

Flag indicating that list of user specified but inaccessed options should be printed when destructor of OptionCollection is called. This flag is false by default.

Flag indicating that list of user set but not accessed option should be printed when destructor of OptionCollection is called.

Referenced by set_show_unused_options_flag(), and ~OptionCollection().

StringVectors utility::options::OptionCollection::string_vectors_
private

String vector options.

Referenced by add(), has(), operator()(), operator[](), show_accessed_options(), and show_unused_options().

Strings utility::options::OptionCollection::strings_
private

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