Rosetta
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | 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 (OptionCollection const &src)
 Copy constructor. More...
 
 ~OptionCollection () override
 Destructor. More...
 
OptionCollectionoperator= (OptionCollection const &src)
 Copy assignment operator. More...
 
OptionCollectionOP clone () const
 
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 &opt)
 Add a BooleanOption. More...
 
IntegerOptionadd (IntegerOption const &opt)
 Add an IntegerOption. More...
 
RealOptionadd (RealOption const &opt)
 Add a RealOption. More...
 
StringOptionadd (StringOption const &opt)
 Add a StringOption. More...
 
FileOptionadd (FileOption const &opt)
 Add a FileOption. More...
 
PathOptionadd (PathOption const &opt)
 Add a PathOption. More...
 
template<typename T >
AnyOption< T > & add (AnyOption< T > const &opt)
 Add an AnyOption. More...
 
BooleanVectorOptionadd (BooleanVectorOption const &opt)
 Add a BooleanVectorOption. More...
 
IntegerVectorOptionadd (IntegerVectorOption const &opt)
 Add an IntegerVectorOption. More...
 
RealVectorOptionadd (RealVectorOption const &opt)
 Add a RealVectorOption. More...
 
ResidueChainVectorOptionadd (ResidueChainVectorOption const &opt)
 Add an ResidueChainVectorOption. More...
 
StringVectorOptionadd (StringVectorOption const &opt)
 Add a StringVectorOption. More...
 
FileVectorOptionadd (FileVectorOption const &opt)
 Add a FileVectorOption. More...
 
PathVectorOptionadd (PathVectorOption const &opt)
 Add a PathVectorOption. More...
 
template<typename T >
AnyVectorOption< T > & add (AnyVectorOption< T > const &opt)
 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...
 
void add_relevant (const OptionKey &key)
 add OptionKey to list of application relevant options More...
 
bool is_relevant (OptionKey const &key)
 Checks if option has been registered as relevant. More...
 
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...
 
void set_show_accessed_options_flag (bool v)
 modify 'show_accessed_options' flag; More...
 
void set_show_unused_options_flag (bool v)
 modify 'show_unused_options' flag; More...
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Static Public Member Functions

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_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...
 

Private Types

typedef std::list< std::string > ValueStrings
 
typedef utility::keys::SmallKeyVector< BooleanOptionKey, BooleanOptionBooleans
 
typedef utility::keys::SmallKeyVector< IntegerOptionKey, IntegerOptionIntegers
 
typedef utility::keys::SmallKeyVector< RealOptionKey, RealOptionReals
 
typedef utility::keys::SmallKeyVector< StringOptionKey, StringOptionStrings
 
typedef utility::keys::SmallKeyVector< FileOptionKey, FileOptionFiles
 
typedef utility::keys::SmallKeyVector< PathOptionKey, PathOptionPaths
 
typedef utility::keys::SmallKeyVector< AnyOptionKey, VariantOption< ScalarOption > > Anys
 
typedef utility::keys::SmallKeyVector< BooleanVectorOptionKey, BooleanVectorOptionBooleanVectors
 
typedef utility::keys::SmallKeyVector< IntegerVectorOptionKey, IntegerVectorOptionIntegerVectors
 
typedef utility::keys::SmallKeyVector< RealVectorOptionKey, RealVectorOptionRealVectors
 
typedef utility::keys::SmallKeyVector< ResidueChainVectorOptionKey, ResidueChainVectorOptionResidueChainVectors
 
typedef utility::keys::SmallKeyVector< StringVectorOptionKey, StringVectorOptionStringVectors
 
typedef utility::keys::SmallKeyVector< FileVectorOptionKey, FileVectorOptionFileVectors
 
typedef utility::keys::SmallKeyVector< PathVectorOptionKey, PathVectorOptionPathVectors
 
typedef utility::keys::SmallKeyVector< AnyVectorOptionKey, VariantOption< VectorOption > > AnyVectors
 
typedef utility::keys::SmallKeyVector< OptionKey, OptionTypesAll
 

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::vector< OptionKey const * > relevant_
 List of application-relevant options. More...
 
std::string argv_copy_
 keep a copy of argv around in case people want to get at it elsewhere in the code. More...
 
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...
 
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...
 

Detailed Description

Program options collection.

Member Typedef Documentation

◆ All

◆ Anys

◆ AnyVectors

◆ Booleans

◆ BooleanVectors

◆ Files

◆ FileVectors

◆ Integers

◆ IntegerVectors

◆ Paths

◆ PathVectors

◆ Reals

◆ RealVectors

◆ ResidueChainVectors

◆ Strings

◆ StringVectors

◆ ValueStrings

typedef std::list< std::string > utility::options::OptionCollection::ValueStrings
private

Constructor & Destructor Documentation

◆ OptionCollection() [1/2]

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

Default constructor.

◆ OptionCollection() [2/2]

utility::options::OptionCollection::OptionCollection ( OptionCollection const &  src)

Copy constructor.

Needed because the mutex can't be copied.

◆ ~OptionCollection()

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

Member Function Documentation

◆ add() [1/28]

template<typename T >
AnyOption< T >& utility::options::OptionCollection::add ( AnyOption< T > const &  opt)
inline

◆ add() [2/28]

template<typename T >
AnyVectorOption< T >& utility::options::OptionCollection::add ( AnyVectorOption< T > const &  opt)
inline

◆ add() [3/28]

BooleanOption& utility::options::OptionCollection::add ( BooleanOption const &  opt)
inline

◆ add() [4/28]

BooleanOption& utility::options::OptionCollection::add ( BooleanOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [5/28]

BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOption const &  opt)
inline

◆ add() [6/28]

BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [7/28]

FileOption& utility::options::OptionCollection::add ( FileOption const &  opt)
inline

◆ add() [8/28]

FileOption& utility::options::OptionCollection::add ( FileOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [9/28]

FileVectorOption& utility::options::OptionCollection::add ( FileVectorOption const &  opt)
inline

◆ add() [10/28]

FileVectorOption& utility::options::OptionCollection::add ( FileVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [11/28]

IntegerOption& utility::options::OptionCollection::add ( IntegerOption const &  opt)
inline

◆ add() [12/28]

IntegerOption& utility::options::OptionCollection::add ( IntegerOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [13/28]

IntegerVectorOption& utility::options::OptionCollection::add ( IntegerVectorOption const &  opt)
inline

◆ add() [14/28]

IntegerVectorOption& utility::options::OptionCollection::add ( IntegerVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [15/28]

PathOption& utility::options::OptionCollection::add ( PathOption const &  opt)
inline

◆ add() [16/28]

PathOption& utility::options::OptionCollection::add ( PathOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [17/28]

PathVectorOption& utility::options::OptionCollection::add ( PathVectorOption const &  opt)
inline

◆ add() [18/28]

PathVectorOption& utility::options::OptionCollection::add ( PathVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [19/28]

RealOption& utility::options::OptionCollection::add ( RealOption const &  opt)
inline

◆ add() [20/28]

RealOption& utility::options::OptionCollection::add ( RealOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [21/28]

RealVectorOption& utility::options::OptionCollection::add ( RealVectorOption const &  opt)
inline

◆ add() [22/28]

RealVectorOption& utility::options::OptionCollection::add ( RealVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [23/28]

ResidueChainVectorOption& utility::options::OptionCollection::add ( ResidueChainVectorOption const &  opt)
inline

◆ add() [24/28]

ResidueChainVectorOption& utility::options::OptionCollection::add ( ResidueChainVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [25/28]

StringOption& utility::options::OptionCollection::add ( StringOption const &  opt)
inline

◆ add() [26/28]

StringOption& utility::options::OptionCollection::add ( StringOptionKey const &  key,
std::string const &  description 
)
inline

◆ add() [27/28]

StringVectorOption& utility::options::OptionCollection::add ( StringVectorOption const &  opt)
inline

◆ add() [28/28]

StringVectorOption& utility::options::OptionCollection::add ( StringVectorOptionKey const &  key,
std::string const &  description 
)
inline

◆ add_built_in_options()

void utility::options::OptionCollection::add_built_in_options ( )

◆ add_edits()

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 create_a3b_hbs::ii, beta_nonlocal::jj, and transposed().

Referenced by find_key_cl().

◆ add_relevant()

void utility::options::OptionCollection::add_relevant ( const OptionKey key)
inline

add OptionKey to list of application relevant options

References subloop_histogram::key, and relevant_.

Referenced by main(), and register_options().

◆ check_key() [1/2]

void utility::options::OptionCollection::check_key ( Option const &  option)
static

◆ check_key() [2/2]

void utility::options::OptionCollection::check_key ( OptionKey const &  key)
static

Check that a key's identifiers are legal.

References CREATE_EXCEPTION, ObjexxFCL::is_double(), subloop_histogram::key, and suffix().

Referenced by add().

◆ check_specs()

void utility::options::OptionCollection::check_specs ( ) const

Check for problems in the option specifications.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References begin, test.T009_Exceptions::e, end, closure_error::error, has(), create_a3b_hbs::i, subloop_histogram::key, option(), and utility::options::std_exit_wrapper().

Referenced by add_built_in_options(), and basic::options::initialize().

◆ check_values()

void utility::options::OptionCollection::check_values ( ) const

Check for problems in the option values.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References begin, test.T009_Exceptions::e, end, closure_error::error, has(), create_a3b_hbs::i, subloop_histogram::key, option(), and utility::options::std_exit_wrapper().

Referenced by load().

◆ cleaned()

std::string utility::options::OptionCollection::cleaned ( std::string const &  s)
static

Cleaned option id with repeat colons condensed.

References test.T009_Exceptions::e, create_a3b_hbs::i, docking::s, and predPRE::t.

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

◆ clone()

OptionCollectionOP utility::options::OptionCollection::clone ( ) const
inline

◆ find_key_cl()

std::string utility::options::OptionCollection::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.

Note
Searches up the context to find a match

References add_edits(), begin, CREATE_EXCEPTION, gpu_set_args::done, test.T009_Exceptions::e, end, has, create_a3b_hbs::i, is_relevant(), subloop_histogram::key, lower_no_under(), merged(), n_part(), n_part_prefix_match(), pid(), suffix(), top, and trim().

Referenced by basic::options::key(), load_option_cl(), and load_option_file().

◆ find_key_file()

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, merged(), and top.

Referenced by load_option_file().

◆ get_argv()

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

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

References argv_copy_.

◆ has() [1/16]

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

◆ has() [2/16]

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

◆ has() [3/16]

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

◆ has() [4/16]

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

◆ has() [5/16]

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

◆ has() [6/16]

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

◆ has() [7/16]

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

◆ has() [8/16]

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

◆ has() [9/16]

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

◆ has() [10/16]

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

◆ has() [11/16]

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

◆ has() [12/16]

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

◆ has() [13/16]

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

◆ has() [14/16]

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

◆ has() [15/16]

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

◆ has() [16/16]

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

◆ is_relevant()

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

Checks if option has been registered as relevant.

Checks is option has been registered as relevant.

References create_a3b_hbs::i, subloop_histogram::key, and relevant_.

Referenced by find_key_cl().

◆ load() [1/3]

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

Load the user-specified option values.

References arg(), find_lowest_scoring_relaxed_struct::args, and argv_copy_.

Referenced by load().

◆ load() [2/3]

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

Load the user-specified option values.

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

◆ load() [3/3]

void utility::options::OptionCollection::load ( std::string  executable_name,
ValueStrings arg_strings,
bool const  free_args 
)

◆ load_option_cl()

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

◆ load_option_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

◆ load_option_from_file()

void utility::options::OptionCollection::load_option_from_file ( std::string const &  arg_string_,
ValueStrings arg_strings,
std::string const &  cid 
)
private

Load one option from user specified file.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References utility::io::izstream::close(), CREATE_EXCEPTION, getline(), load_option_cl(), res, and utility::split_to_list().

Referenced by load(), and load_option_file().

◆ load_options_from_file()

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

Load all options in a flags file.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References load_options_from_file_exception().

Referenced by load(), load_options_from_stream(), and LigandDockBenchmark::setUp().

◆ load_options_from_file_exception()

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.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References CREATE_EXCEPTION, and load_options_from_stream().

Referenced by load_options_from_file().

◆ load_options_from_stream()

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 
)

◆ lower_no_under()

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().

◆ merged()

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(), docking::s, suffix(), predPRE::t, and trimmed().

Referenced by find_key_cl(), and find_key_file().

◆ n_part()

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

◆ n_part_prefix_match()

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

◆ operator()() [1/38]

Option& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [2/38]

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 subloop_histogram::key.

◆ operator()() [3/38]

Option const& utility::options::OptionCollection::operator() ( AnyOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [4/38]

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 subloop_histogram::key.

◆ operator()() [5/38]

VectorOption& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [6/38]

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 subloop_histogram::key.

◆ operator()() [7/38]

VectorOption const& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [8/38]

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 subloop_histogram::key.

◆ operator()() [9/38]

BooleanOption& utility::options::OptionCollection::operator() ( BooleanOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [10/38]

BooleanOption const& utility::options::OptionCollection::operator() ( BooleanOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [11/38]

BooleanVectorOption& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [12/38]

BooleanVectorOption const& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [13/38]

FileOption& utility::options::OptionCollection::operator() ( FileOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [14/38]

FileOption const& utility::options::OptionCollection::operator() ( FileOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [15/38]

FileVectorOption& utility::options::OptionCollection::operator() ( FileVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [16/38]

FileVectorOption const& utility::options::OptionCollection::operator() ( FileVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [17/38]

IntegerOption& utility::options::OptionCollection::operator() ( IntegerOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [18/38]

IntegerOption const& utility::options::OptionCollection::operator() ( IntegerOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [19/38]

IntegerVectorOption& utility::options::OptionCollection::operator() ( IntegerVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [20/38]

IntegerVectorOption const& utility::options::OptionCollection::operator() ( IntegerVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [21/38]

Option& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [22/38]

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 subloop_histogram::key.

◆ operator()() [23/38]

Option const& utility::options::OptionCollection::operator() ( OptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [24/38]

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 subloop_histogram::key.

◆ operator()() [25/38]

PathOption& utility::options::OptionCollection::operator() ( PathOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [26/38]

PathOption const& utility::options::OptionCollection::operator() ( PathOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [27/38]

PathVectorOption& utility::options::OptionCollection::operator() ( PathVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [28/38]

PathVectorOption const& utility::options::OptionCollection::operator() ( PathVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [29/38]

RealOption& utility::options::OptionCollection::operator() ( RealOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [30/38]

RealOption const& utility::options::OptionCollection::operator() ( RealOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [31/38]

RealVectorOption& utility::options::OptionCollection::operator() ( RealVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [32/38]

RealVectorOption const& utility::options::OptionCollection::operator() ( RealVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [33/38]

ResidueChainVectorOption& utility::options::OptionCollection::operator() ( ResidueChainVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [34/38]

ResidueChainVectorOption const& utility::options::OptionCollection::operator() ( ResidueChainVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [35/38]

StringOption& utility::options::OptionCollection::operator() ( StringOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [36/38]

StringOption const& utility::options::OptionCollection::operator() ( StringOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator()() [37/38]

StringVectorOption& utility::options::OptionCollection::operator() ( StringVectorOptionKey const &  key,
bool  check_restricted_access = true 
)
inline

◆ operator()() [38/38]

StringVectorOption const& utility::options::OptionCollection::operator() ( StringVectorOptionKey const &  key,
bool  check_restricted_access = true 
) const
inline

◆ operator=()

OptionCollection & utility::options::OptionCollection::operator= ( OptionCollection const &  src)

◆ operator[]() [1/38]

Option& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key)
inline

◆ operator[]() [2/38]

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

OptionCollection[ AnyOptionKey ] with option type template argument.

References anys_, and subloop_histogram::key.

◆ operator[]() [3/38]

Option const& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key) const
inline

◆ operator[]() [4/38]

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

OptionCollection[ AnyOptionKey ] with option type template argument.

References anys_, and subloop_histogram::key.

◆ operator[]() [5/38]

VectorOption& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key)
inline

◆ operator[]() [6/38]

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

OptionCollection[ AnyVectorOptionKey ] with option type template argument.

References any_vectors_, and subloop_histogram::key.

◆ operator[]() [7/38]

VectorOption const& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key) const
inline

◆ operator[]() [8/38]

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 subloop_histogram::key.

◆ operator[]() [9/38]

BooleanOption& utility::options::OptionCollection::operator[] ( BooleanOptionKey const &  key)
inline

◆ operator[]() [10/38]

BooleanOption const& utility::options::OptionCollection::operator[] ( BooleanOptionKey const &  key) const
inline

◆ operator[]() [11/38]

BooleanVectorOption& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key)
inline

◆ operator[]() [12/38]

BooleanVectorOption const& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key) const
inline

◆ operator[]() [13/38]

FileOption& utility::options::OptionCollection::operator[] ( FileOptionKey const &  key)
inline

◆ operator[]() [14/38]

FileOption const& utility::options::OptionCollection::operator[] ( FileOptionKey const &  key) const
inline

◆ operator[]() [15/38]

FileVectorOption& utility::options::OptionCollection::operator[] ( FileVectorOptionKey const &  key)
inline

◆ operator[]() [16/38]

FileVectorOption const& utility::options::OptionCollection::operator[] ( FileVectorOptionKey const &  key) const
inline

◆ operator[]() [17/38]

IntegerOption& utility::options::OptionCollection::operator[] ( IntegerOptionKey const &  key)
inline

◆ operator[]() [18/38]

IntegerOption const& utility::options::OptionCollection::operator[] ( IntegerOptionKey const &  key) const
inline

◆ operator[]() [19/38]

IntegerVectorOption& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key)
inline

◆ operator[]() [20/38]

IntegerVectorOption const& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key) const
inline

◆ operator[]() [21/38]

Option& utility::options::OptionCollection::operator[] ( OptionKey const &  key)
inline

◆ operator[]() [22/38]

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

OptionCollection[ OptionKey ] with option type template argument.

References subloop_histogram::key.

◆ operator[]() [23/38]

Option const& utility::options::OptionCollection::operator[] ( OptionKey const &  key) const
inline

◆ operator[]() [24/38]

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

OptionCollection[ OptionKey ] with option type template argument.

References subloop_histogram::key.

◆ operator[]() [25/38]

PathOption& utility::options::OptionCollection::operator[] ( PathOptionKey const &  key)
inline

◆ operator[]() [26/38]

PathOption const& utility::options::OptionCollection::operator[] ( PathOptionKey const &  key) const
inline

◆ operator[]() [27/38]

PathVectorOption& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key)
inline

◆ operator[]() [28/38]

PathVectorOption const& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key) const
inline

◆ operator[]() [29/38]

RealOption& utility::options::OptionCollection::operator[] ( RealOptionKey const &  key)
inline

◆ operator[]() [30/38]

RealOption const& utility::options::OptionCollection::operator[] ( RealOptionKey const &  key) const
inline

◆ operator[]() [31/38]

RealVectorOption& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key)
inline

◆ operator[]() [32/38]

RealVectorOption const& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key) const
inline

◆ operator[]() [33/38]

ResidueChainVectorOption& utility::options::OptionCollection::operator[] ( ResidueChainVectorOptionKey const &  key)
inline

◆ operator[]() [34/38]

ResidueChainVectorOption const& utility::options::OptionCollection::operator[] ( ResidueChainVectorOptionKey const &  key) const
inline

◆ operator[]() [35/38]

StringOption& utility::options::OptionCollection::operator[] ( StringOptionKey const &  key)
inline

◆ operator[]() [36/38]

StringOption const& utility::options::OptionCollection::operator[] ( StringOptionKey const &  key) const
inline

◆ operator[]() [37/38]

StringVectorOption& utility::options::OptionCollection::operator[] ( StringVectorOptionKey const &  key)
inline

◆ operator[]() [38/38]

StringVectorOption const& utility::options::OptionCollection::operator[] ( StringVectorOptionKey const &  key) const
inline

◆ option() [1/36]

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

◆ option() [2/36]

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

Option by AnyOptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [3/36]

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

◆ option() [4/36]

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

Option by AnyOptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [5/36]

VectorOption& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key)
inline

◆ option() [6/36]

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

VectorOption by AnyVectorOptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [7/36]

VectorOption const& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) const
inline

◆ option() [8/36]

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

VectorOption by AnyVectorOptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [9/36]

BooleanOption& utility::options::OptionCollection::option ( BooleanOptionKey const &  key)
inline

◆ option() [10/36]

BooleanOption const& utility::options::OptionCollection::option ( BooleanOptionKey const &  key) const
inline

◆ option() [11/36]

BooleanVectorOption& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key)
inline

◆ option() [12/36]

BooleanVectorOption const& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key) const
inline

◆ option() [13/36]

FileOption& utility::options::OptionCollection::option ( FileOptionKey const &  key)
inline

◆ option() [14/36]

FileOption const& utility::options::OptionCollection::option ( FileOptionKey const &  key) const
inline

◆ option() [15/36]

FileVectorOption& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key)
inline

◆ option() [16/36]

FileVectorOption const& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key) const
inline

◆ option() [17/36]

IntegerOption& utility::options::OptionCollection::option ( IntegerOptionKey const &  key)
inline

◆ option() [18/36]

IntegerOption const& utility::options::OptionCollection::option ( IntegerOptionKey const &  key) const
inline

◆ option() [19/36]

IntegerVectorOption& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key)
inline

◆ option() [20/36]

IntegerVectorOption const& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key) const
inline

◆ option() [21/36]

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

◆ option() [22/36]

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

Option by OptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [23/36]

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

◆ option() [24/36]

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

Option by OptionKey with option type template argument.

References subloop_histogram::key.

◆ option() [25/36]

PathOption& utility::options::OptionCollection::option ( PathOptionKey const &  key)
inline

◆ option() [26/36]

PathOption const& utility::options::OptionCollection::option ( PathOptionKey const &  key) const
inline

◆ option() [27/36]

PathVectorOption& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key)
inline

◆ option() [28/36]

PathVectorOption const& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key) const
inline

◆ option() [29/36]

RealOption& utility::options::OptionCollection::option ( RealOptionKey const &  key)
inline

◆ option() [30/36]

RealOption const& utility::options::OptionCollection::option ( RealOptionKey const &  key) const
inline

◆ option() [31/36]

RealVectorOption& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key)
inline

◆ option() [32/36]

RealVectorOption const& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key) const
inline

◆ option() [33/36]

StringOption& utility::options::OptionCollection::option ( StringOptionKey const &  key)
inline

◆ option() [34/36]

StringOption const& utility::options::OptionCollection::option ( StringOptionKey const &  key) const
inline

◆ option() [35/36]

StringVectorOption& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key)
inline

◆ option() [36/36]

StringVectorOption const& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key) const
inline

◆ prefix()

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

◆ set_option_value_cl()

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(), utility::io::oc::cout, CREATE_EXCEPTION, has, has(), utility::options::has_non_ascii(), ObjexxFCL::is_any_of(), utility::options::Option::is_cl_value(), subloop_histogram::key, option(), and runtime_assert.

Referenced by load_option_cl().

◆ set_option_value_file()

void utility::options::OptionCollection::set_option_value_file ( std::string const &  key_id,
ValueStrings val_strings 
)
private

◆ set_show_accessed_options_flag()

void utility::options::OptionCollection::set_show_accessed_options_flag ( bool  v)
inline

modify 'show_accessed_options' flag;

References show_accessed_options_, and kmeans_adaptive_kernel_density_bb_dependent_rotlib::v.

◆ set_show_unused_options_flag()

void utility::options::OptionCollection::set_show_unused_options_flag ( bool  v)
inline

modify 'show_unused_options' flag;

References show_unused_options_, and kmeans_adaptive_kernel_density_bb_dependent_rotlib::v.

◆ show_accessed_options()

void utility::options::OptionCollection::show_accessed_options ( std::ostream &  stream) const

◆ show_all()

void utility::options::OptionCollection::show_all ( std::ostream &  stream) const

◆ show_all_hier()

void utility::options::OptionCollection::show_all_hier ( std::ostream &  stream) const

◆ show_help()

void utility::options::OptionCollection::show_help ( std::ostream &  stream)

◆ show_help_hier()

void utility::options::OptionCollection::show_help_hier ( std::ostream &  stream)

◆ show_inaccessed_user_options()

void utility::options::OptionCollection::show_inaccessed_user_options ( std::ostream &  stream) const

◆ show_option_help()

void utility::options::OptionCollection::show_option_help ( OptionKey const &  key,
std::string &  group,
std::ostream &  stream 
)

Show one option and it description.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References utility::options::Option::default_string(), utility::options::Option::description(), compute_difference::group, has(), utility::options::Option::id(), subloop_histogram::key, utility::options::Option::legal_string(), min(), option(), prefix(), space_prefixed(), and wrapped().

Referenced by show_help().

◆ show_option_help_hier()

void utility::options::OptionCollection::show_option_help_hier ( OptionKey const &  key,
std::string &  group,
std::ostream &  stream 
)

Show one option and it description in a hierarchy format.

Note
This function calls only threadsafe functions (that lock appropriate mutexes), so it doesn't need to lock any mutexes itself.

References spectral_cluster_kmeans_adaptive_kernel_density_bb_dependent_rotlib::A, COL1, COL2, COL3, utility::options::Option::description(), compute_difference::group, has(), utility::options::Option::id(), subloop_histogram::key, n_part(), option(), prefix(), ObjexxFCL::format::RJ(), suffix(), utility::options::Option::type_string(), utility::options::Option::value_string(), and wrapped().

Referenced by show_help_hier().

◆ show_table_text()

void utility::options::OptionCollection::show_table_text ( std::ostream &  stream) const

◆ show_table_Wiki()

void utility::options::OptionCollection::show_table_Wiki ( std::ostream &  stream) const

◆ show_unused_options()

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_, create_a3b_hbs::i, integer_vectors_, integers_, path_vectors_, paths_, real_vectors_, reals_, utility::options::show_unused_options_T(), string_vectors_, and strings_.

Referenced by ~OptionCollection().

◆ show_user()

void utility::options::OptionCollection::show_user ( std::ostream &  stream) const

◆ space_prefixed()

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 kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, and docking::s.

Referenced by show_option_help().

◆ suffix()

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

◆ tab_prefixed()

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 kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, and docking::s.

◆ trim()

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

◆ trimmed()

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 create_a3b_hbs::i, kmeans_adaptive_kernel_density_bb_dependent_rotlib::idx, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, n_part(), runtime_assert, and docking::s.

Referenced by merged().

◆ wrapped()

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

◆ operator<<

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

Output to stream.

Member Data Documentation

◆ all_

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

All options (non-owning pointers)

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

◆ any_vectors_

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

Any value type vector options.

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

◆ anys_

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

Any value type options.

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

◆ argv_copy_

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(), load(), and operator=().

◆ boolean_vectors_

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

◆ booleans_

Booleans utility::options::OptionCollection::booleans_
private

◆ file_vectors_

FileVectors utility::options::OptionCollection::file_vectors_
private

◆ files_

Files utility::options::OptionCollection::files_
private

◆ integer_vectors_

IntegerVectors utility::options::OptionCollection::integer_vectors_
private

◆ integers_

Integers utility::options::OptionCollection::integers_
private

◆ path_vectors_

PathVectors utility::options::OptionCollection::path_vectors_
private

◆ paths_

Paths utility::options::OptionCollection::paths_
private

◆ real_vectors_

RealVectors utility::options::OptionCollection::real_vectors_
private

◆ reals_

Reals utility::options::OptionCollection::reals_
private

◆ relevant_

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

List of application-relevant options.

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

◆ residue_chain_vectors_

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

Residue/chain vector options.

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

◆ show_accessed_options_

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

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

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

◆ show_unused_options_

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

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.

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

◆ string_vectors_

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

◆ strings_

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

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