Rosetta 3.3
Public Member Functions | Static Public Member Functions | Friends
utility::options::OptionCollection Class Reference

Program options collection. More...

#include <OptionCollection.hh>

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

List of all members.

Public Member Functions

 OptionCollection ()
 Default constructor.
 ~OptionCollection ()
 Destructor.
void add_built_in_options ()
 Add the built-in options.
void add_relevant (const OptionKey &key)
 add OptionKey to list of application relevant options
BooleanOptionadd (BooleanOptionKey const &key, std::string const &description)
 Add a BooleanOption.
IntegerOptionadd (IntegerOptionKey const &key, std::string const &description)
 Add an IntegerOption.
RealOptionadd (RealOptionKey const &key, std::string const &description)
 Add a RealOption.
StringOptionadd (StringOptionKey const &key, std::string const &description)
 Add a StringOption.
FileOptionadd (FileOptionKey const &key, std::string const &description)
 Add a FileOption.
PathOptionadd (PathOptionKey const &key, std::string const &description)
 Add a PathOption.
BooleanVectorOptionadd (BooleanVectorOptionKey const &key, std::string const &description)
 Add a BooleanVectorOption.
IntegerVectorOptionadd (IntegerVectorOptionKey const &key, std::string const &description)
 Add an IntegerVectorOption.
RealVectorOptionadd (RealVectorOptionKey const &key, std::string const &description)
 Add a RealVectorOption.
StringVectorOptionadd (StringVectorOptionKey const &key, std::string const &description)
 Add a StringVectorOption.
FileVectorOptionadd (FileVectorOptionKey const &key, std::string const &description)
 Add a FileVectorOption.
PathVectorOptionadd (PathVectorOptionKey const &key, std::string const &description)
 Add a PathVectorOption.
BooleanOptionadd (BooleanOption const &option)
 Add a BooleanOption.
IntegerOptionadd (IntegerOption const &option)
 Add an IntegerOption.
RealOptionadd (RealOption const &option)
 Add a RealOption.
StringOptionadd (StringOption const &option)
 Add a StringOption.
FileOptionadd (FileOption const &option)
 Add a FileOption.
PathOptionadd (PathOption const &option)
 Add a PathOption.
template<typename T >
AnyOption< T > & add (AnyOption< T > const &option)
 Add an AnyOption.
BooleanVectorOptionadd (BooleanVectorOption const &option)
 Add a BooleanVectorOption.
IntegerVectorOptionadd (IntegerVectorOption const &option)
 Add an IntegerVectorOption.
RealVectorOptionadd (RealVectorOption const &option)
 Add a RealVectorOption.
StringVectorOptionadd (StringVectorOption const &option)
 Add a StringVectorOption.
FileVectorOptionadd (FileVectorOption const &option)
 Add a FileVectorOption.
PathVectorOptionadd (PathVectorOption const &option)
 Add a PathVectorOption.
template<typename T >
AnyVectorOption< T > & add (AnyVectorOption< T > const &option)
 Add an AnyVectorOption.
void check_specs () const
 Check for problems in the option specifications.
void load (int const argc, char *const argv[], bool const free_args=false)
 Load the user-specified option values.
void load_options_from_file (std::string const &file_string, std::string const &cid="")
 Load all options in a flags file.
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
void load_options_from_stream (std::istream &stream, std::string const &file_string="STREAM", std::string const &cid="")
 Load all options in a flags file.
void check_values () const
 Check for problems in the option values.
void show_help (std::ostream &stream) const
 Show all the options and their descriptions.
void show_option_help (OptionKey const &, std::string &group, std::ostream &stream) const
 Show one option and it description.
void show_help_hier (std::ostream &stream) const
 Show all the options and their descriptions in a hierarchy format.
void show_option_help_heir (OptionKey const &, std::string &group, std::ostream &stream) const
 Show one option and it description in a hierarchy format.
void show_user (std::ostream &stream) const
 Show the user-specified options and their values.
void show_all (std::ostream &stream) const
 Show all the options and their values.
void show_all_hier (std::ostream &stream) const
 Show all the options and their values in a hierarchy format.
void show_table_text (std::ostream &stream) const
 Show the options definitions table in text format.
void show_table_Wiki (std::ostream &stream) const
 Show the options definitions table in Wiki format.
void show_accessed_options (std::ostream &stream) const
 Show accessed list of options.
void show_inaccessed_user_options (std::ostream &stream) const
 Show inaccessed user-specified options.
std::string get_argv () const
 Returns a copy of the concatenated argv strings that were initialized in load().
bool has (BooleanOptionKey const &key) const
 Is there an option with a BooleanOptionKey?
bool has (IntegerOptionKey const &key) const
 Is there an option with an IntegerOptionKey?
bool has (RealOptionKey const &key) const
 Is there an option with a RealOptionKey?
bool has (StringOptionKey const &key) const
 Is there an option with a StringOptionKey?
bool has (FileOptionKey const &key) const
 Is there an option with a FileOptionKey?
bool has (PathOptionKey const &key) const
 Is there an option with a PathOptionKey?
bool has (AnyOptionKey const &key) const
 Is there an option with an AnyOptionKey?
bool has (BooleanVectorOptionKey const &key) const
 Is there an option with a BooleanVectorOptionKey?
bool has (IntegerVectorOptionKey const &key) const
 Is there an option with an IntegerVectorOptionKey?
bool has (RealVectorOptionKey const &key) const
 Is there an option with a RealVectorOptionKey?
bool has (StringVectorOptionKey const &key) const
 Is there an option with a StringVectorOptionKey?
bool has (FileVectorOptionKey const &key) const
 Is there an option with a FileVectorOptionKey?
bool has (PathVectorOptionKey const &key) const
 Is there an option with a PathVectorOptionKey?
bool has (AnyVectorOptionKey const &key) const
 Is there an option with an AnyVectorOptionKey?
bool has (OptionKey const &key) const
 Is there an option with an OptionKey?
BooleanOption const & option (BooleanOptionKey const &key) const
 Option by BooleanOptionKey.
BooleanOptionoption (BooleanOptionKey const &key)
 Option by BooleanOptionKey.
IntegerOption const & option (IntegerOptionKey const &key) const
 Option by IntegerOptionKey.
IntegerOptionoption (IntegerOptionKey const &key)
 Option by IntegerOptionKey.
RealOption const & option (RealOptionKey const &key) const
 Option by RealOptionKey.
RealOptionoption (RealOptionKey const &key)
 Option by RealOptionKey.
StringOption const & option (StringOptionKey const &key) const
 Option by StringOptionKey.
StringOptionoption (StringOptionKey const &key)
 Option by StringOptionKey.
FileOption const & option (FileOptionKey const &key) const
 Option by FileOptionKey.
FileOptionoption (FileOptionKey const &key)
 Option by FileOptionKey.
PathOption const & option (PathOptionKey const &key) const
 Option by PathOptionKey.
PathOptionoption (PathOptionKey const &key)
 Option by PathOptionKey.
Option const & option (AnyOptionKey const &key) const
 Option by AnyOptionKey.
Optionoption (AnyOptionKey const &key)
 Option by AnyOptionKey.
template<typename OptionType >
OptionType const & option (AnyOptionKey const &key) const
 Option by AnyOptionKey with option type template argument.
template<typename OptionType >
OptionType & option (AnyOptionKey const &key)
 Option by AnyOptionKey with option type template argument.
BooleanVectorOption const & option (BooleanVectorOptionKey const &key) const
 VectorOption by BooleanVectorOptionKey.
BooleanVectorOptionoption (BooleanVectorOptionKey const &key)
 VectorOption by BooleanVectorOptionKey.
IntegerVectorOption const & option (IntegerVectorOptionKey const &key) const
 VectorOption by IntegerVectorOptionKey.
IntegerVectorOptionoption (IntegerVectorOptionKey const &key)
 VectorOption by IntegerVectorOptionKey.
RealVectorOption const & option (RealVectorOptionKey const &key) const
 VectorOption by RealVectorOptionKey.
RealVectorOptionoption (RealVectorOptionKey const &key)
 VectorOption by RealVectorOptionKey.
StringVectorOption const & option (StringVectorOptionKey const &key) const
 VectorOption by StringVectorOptionKey.
StringVectorOptionoption (StringVectorOptionKey const &key)
 VectorOption by StringVectorOptionKey.
FileVectorOption const & option (FileVectorOptionKey const &key) const
 VectorOption by FileVectorOptionKey.
FileVectorOptionoption (FileVectorOptionKey const &key)
 VectorOption by FileVectorOptionKey.
PathVectorOption const & option (PathVectorOptionKey const &key) const
 VectorOption by PathVectorOptionKey.
PathVectorOptionoption (PathVectorOptionKey const &key)
 VectorOption by PathVectorOptionKey.
VectorOption const & option (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey.
VectorOptionoption (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey.
template<typename VectorOptionType >
VectorOptionType const & option (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey with option type template argument.
template<typename VectorOptionType >
VectorOptionType & option (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey with option type template argument.
Option const & option (OptionKey const &key) const
 Option by OptionKey.
Optionoption (OptionKey const &key)
 Option by OptionKey.
template<typename OptionType >
OptionType const & option (OptionKey const &key) const
 Option by OptionKey with option type template argument.
template<typename OptionType >
OptionType & option (OptionKey const &key)
 Option by OptionKey with option type template argument.
BooleanOption const & operator[] (BooleanOptionKey const &key) const
 OptionCollection[ BooleanOptionKey ].
BooleanOptionoperator[] (BooleanOptionKey const &key)
 OptionCollection[ BooleanOptionKey ].
IntegerOption const & operator[] (IntegerOptionKey const &key) const
 OptionCollection[ IntegerOptionKey ].
IntegerOptionoperator[] (IntegerOptionKey const &key)
 OptionCollection[ IntegerOptionKey ].
RealOption const & operator[] (RealOptionKey const &key) const
 OptionCollection[ RealOptionKey ].
RealOptionoperator[] (RealOptionKey const &key)
 OptionCollection[ RealOptionKey ].
StringOption const & operator[] (StringOptionKey const &key) const
 OptionCollection[ StringOptionKey ].
StringOptionoperator[] (StringOptionKey const &key)
 OptionCollection[ StringOptionKey ].
FileOption const & operator[] (FileOptionKey const &key) const
 OptionCollection[ FileOptionKey ].
FileOptionoperator[] (FileOptionKey const &key)
 OptionCollection[ FileOptionKey ].
PathOption const & operator[] (PathOptionKey const &key) const
 OptionCollection[ PathOptionKey ].
PathOptionoperator[] (PathOptionKey const &key)
 OptionCollection[ PathOptionKey ].
Option const & operator[] (AnyOptionKey const &key) const
 OptionCollection[ AnyOptionKey ].
Optionoperator[] (AnyOptionKey const &key)
 OptionCollection[ AnyOptionKey ].
template<typename OptionType >
OptionType const & operator[] (AnyOptionKey const &key) const
 OptionCollection[ AnyOptionKey ] with option type template argument.
template<typename OptionType >
OptionType & operator[] (AnyOptionKey const &key)
 OptionCollection[ AnyOptionKey ] with option type template argument.
BooleanVectorOption const & operator[] (BooleanVectorOptionKey const &key) const
 OptionCollection[ BooleanVectorOptionKey ].
BooleanVectorOptionoperator[] (BooleanVectorOptionKey const &key)
 OptionCollection[ BooleanVectorOptionKey ].
IntegerVectorOption const & operator[] (IntegerVectorOptionKey const &key) const
 OptionCollection[ IntegerVectorOptionKey ].
IntegerVectorOptionoperator[] (IntegerVectorOptionKey const &key)
 OptionCollection[ IntegerVectorOptionKey ].
RealVectorOption const & operator[] (RealVectorOptionKey const &key) const
 OptionCollection[ RealVectorOptionKey ].
RealVectorOptionoperator[] (RealVectorOptionKey const &key)
 OptionCollection[ RealVectorOptionKey ].
StringVectorOption const & operator[] (StringVectorOptionKey const &key) const
 OptionCollection[ StringVectorOptionKey ].
StringVectorOptionoperator[] (StringVectorOptionKey const &key)
 OptionCollection[ StringVectorOptionKey ].
FileVectorOption const & operator[] (FileVectorOptionKey const &key) const
 OptionCollection[ FileVectorOptionKey ].
FileVectorOptionoperator[] (FileVectorOptionKey const &key)
 OptionCollection[ FileVectorOptionKey ].
PathVectorOption const & operator[] (PathVectorOptionKey const &key) const
 OptionCollection[ PathVectorOptionKey ].
PathVectorOptionoperator[] (PathVectorOptionKey const &key)
 OptionCollection[ PathVectorOptionKey ].
VectorOption const & operator[] (AnyVectorOptionKey const &key) const
 OptionCollection[ AnyVectorOptionKey ].
VectorOptionoperator[] (AnyVectorOptionKey const &key)
 OptionCollection[ AnyVectorOptionKey ].
template<typename VectorOptionType >
VectorOptionType const & operator[] (AnyVectorOptionKey const &key) const
 OptionCollection[ AnyVectorOptionKey ] with option type template argument.
template<typename VectorOptionType >
VectorOptionType & operator[] (AnyVectorOptionKey const &key)
 OptionCollection[ AnyVectorOptionKey ] with option type template argument.
Option const & operator[] (OptionKey const &key) const
 OptionCollection[ OptionKey ].
Optionoperator[] (OptionKey const &key)
 OptionCollection[ OptionKey ].
template<typename OptionType >
OptionType const & operator[] (OptionKey const &key) const
 OptionCollection[ OptionKey ] with option type template argument.
template<typename OptionType >
OptionType & operator[] (OptionKey const &key)
 OptionCollection[ OptionKey ] with option type template argument.
BooleanOption const & operator() (BooleanOptionKey const &key) const
 Option by BooleanOptionKey.
BooleanOptionoperator() (BooleanOptionKey const &key)
 Option by BooleanOptionKey.
IntegerOption const & operator() (IntegerOptionKey const &key) const
 Option by IntegerOptionKey.
IntegerOptionoperator() (IntegerOptionKey const &key)
 Option by IntegerOptionKey.
RealOption const & operator() (RealOptionKey const &key) const
 Option by RealOptionKey.
RealOptionoperator() (RealOptionKey const &key)
 Option by RealOptionKey.
StringOption const & operator() (StringOptionKey const &key) const
 Option by StringOptionKey.
StringOptionoperator() (StringOptionKey const &key)
 Option by StringOptionKey.
FileOption const & operator() (FileOptionKey const &key) const
 Option by FileOptionKey.
FileOptionoperator() (FileOptionKey const &key)
 Option by FileOptionKey.
PathOption const & operator() (PathOptionKey const &key) const
 Option by PathOptionKey.
PathOptionoperator() (PathOptionKey const &key)
 Option by PathOptionKey.
Option const & operator() (AnyOptionKey const &key) const
 Option by AnyOptionKey.
Optionoperator() (AnyOptionKey const &key)
 Option by AnyOptionKey.
template<typename OptionType >
OptionType const & operator() (AnyOptionKey const &key) const
 Option by AnyOptionKey with option type template argument.
template<typename OptionType >
OptionType & operator() (AnyOptionKey const &key)
 Option by AnyOptionKey with option type template argument.
BooleanVectorOption const & operator() (BooleanVectorOptionKey const &key) const
 VectorOption by BooleanVectorOptionKey.
BooleanVectorOptionoperator() (BooleanVectorOptionKey const &key)
 VectorOption by BooleanVectorOptionKey.
IntegerVectorOption const & operator() (IntegerVectorOptionKey const &key) const
 VectorOption by IntegerVectorOptionKey.
IntegerVectorOptionoperator() (IntegerVectorOptionKey const &key)
 VectorOption by IntegerVectorOptionKey.
RealVectorOption const & operator() (RealVectorOptionKey const &key) const
 VectorOption by RealVectorOptionKey.
RealVectorOptionoperator() (RealVectorOptionKey const &key)
 VectorOption by RealVectorOptionKey.
StringVectorOption const & operator() (StringVectorOptionKey const &key) const
 VectorOption by StringVectorOptionKey.
StringVectorOptionoperator() (StringVectorOptionKey const &key)
 VectorOption by StringVectorOptionKey.
FileVectorOption const & operator() (FileVectorOptionKey const &key) const
 VectorOption by FileVectorOptionKey.
FileVectorOptionoperator() (FileVectorOptionKey const &key)
 VectorOption by FileVectorOptionKey.
PathVectorOption const & operator() (PathVectorOptionKey const &key) const
 VectorOption by PathVectorOptionKey.
PathVectorOptionoperator() (PathVectorOptionKey const &key)
 VectorOption by PathVectorOptionKey.
VectorOption const & operator() (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey.
VectorOptionoperator() (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey.
template<typename VectorOptionType >
VectorOptionType const & operator() (AnyVectorOptionKey const &key) const
 VectorOption by AnyVectorOptionKey with option type template argument.
template<typename VectorOptionType >
VectorOptionType & operator() (AnyVectorOptionKey const &key)
 VectorOption by AnyVectorOptionKey with option type template argument.
Option const & operator() (OptionKey const &key) const
 Option by OptionKey.
Optionoperator() (OptionKey const &key)
 Option by OptionKey.
template<typename OptionType >
OptionType const & operator() (OptionKey const &key) const
 Option by OptionKey with option type template argument.
template<typename OptionType >
OptionType & operator() (OptionKey const &key)
 Option by OptionKey with option type template argument.

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.
static std::string tab_prefixed (std::string const &s, int const n=1)
 Tab-prefixed string except blank if string is empty.
static void check_key (OptionKey const &key)
 Check that a key's identifiers are legal.
static void check_key (Option const &option)
 Check that an option's identifiers are legal.
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.
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.
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.
static std::string prefix (std::string const &s, int const n=1)
 Prefix of an option id with a specified number of parts.
static std::string suffix (std::string const &s, int const n=1)
 Suffix of an option id with a specified number of parts.
static std::string & trim (std::string &s, int const n=1)
 Trim a specified number of parts from the suffix of an option id.
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.
static std::string cleaned (std::string const &s)
 Cleaned option id with repeat colons condensed.
static std::string merged (std::string const &s, std::string const &t)
 Merged option ids with the minimal suffix-prefix overlap, if any, removed.
static std::string wrapped (std::string const &s, std::string::size_type const indent=10, std::string::size_type const width=80)
 String wrapped and indented.
static void set_show_accessed_options_flag (bool v)
 modify 'show_accessed_options' flag;

Friends

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

Detailed Description

Program options collection.


Constructor & Destructor Documentation

utility::options::OptionCollection::OptionCollection ( ) [inline]

Default constructor.

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

Destructor.

References utility::io::oc::cout, and show_accessed_options().


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]

Add an IntegerOption.

References check_key().

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

Add a PathOption.

References check_key().

IntegerOption& utility::options::OptionCollection::add ( IntegerOption const &  option) [inline]
RealOption& utility::options::OptionCollection::add ( RealOption const &  option) [inline]
BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOptionKey const &  key,
std::string const &  description 
) [inline]

Add a BooleanVectorOption.

References check_key().

StringOption& utility::options::OptionCollection::add ( StringOption const &  option) [inline]
FileOption& utility::options::OptionCollection::add ( FileOption const &  option) [inline]
RealOption& utility::options::OptionCollection::add ( RealOptionKey const &  key,
std::string const &  description 
) [inline]

Add a RealOption.

References check_key().

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

Add an IntegerVectorOption.

References check_key().

PathOption& utility::options::OptionCollection::add ( PathOption const &  option) [inline]
template<typename T >
AnyOption< T >& utility::options::OptionCollection::add ( AnyOption< T > const &  option) [inline]
RealVectorOption& utility::options::OptionCollection::add ( RealVectorOptionKey const &  key,
std::string const &  description 
) [inline]

Add a RealVectorOption.

References check_key().

BooleanVectorOption& utility::options::OptionCollection::add ( BooleanVectorOption const &  option) [inline]
IntegerVectorOption& utility::options::OptionCollection::add ( IntegerVectorOption const &  option) [inline]
StringOption& utility::options::OptionCollection::add ( StringOptionKey const &  key,
std::string const &  description 
) [inline]

Add a StringOption.

References check_key().

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

Add a StringVectorOption.

References check_key().

RealVectorOption& utility::options::OptionCollection::add ( RealVectorOption const &  option) [inline]
StringVectorOption& utility::options::OptionCollection::add ( StringVectorOption const &  option) [inline]
FileVectorOption& utility::options::OptionCollection::add ( FileVectorOptionKey const &  key,
std::string const &  description 
) [inline]

Add a FileVectorOption.

References check_key().

FileVectorOption& utility::options::OptionCollection::add ( FileVectorOption const &  option) [inline]
PathVectorOption& utility::options::OptionCollection::add ( PathVectorOption const &  option) [inline]
FileOption& utility::options::OptionCollection::add ( FileOptionKey const &  key,
std::string const &  description 
) [inline]

Add a FileOption.

References check_key().

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

Add a PathVectorOption.

References check_key().

template<typename T >
AnyVectorOption< T >& utility::options::OptionCollection::add ( AnyVectorOption< T > const &  option) [inline]
BooleanOption& utility::options::OptionCollection::add ( BooleanOption const &  option) [inline]
void utility::options::OptionCollection::add_built_in_options ( )
void utility::options::OptionCollection::add_relevant ( const OptionKey key) [inline]

add OptionKey to list of application relevant options

Referenced by main().

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

Check for problems in the option specifications.

References begin, end, has(), color_pdb::i, key, option(), and utility::options::std_exit_wrapper().

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

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

Check for problems in the option values.

References begin, end, has(), color_pdb::i, key, option(), and utility::options::std_exit_wrapper().

Referenced by load().

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

Cleaned option id with repeat colons condensed.

References color_pdb::i, and sd::t.

Referenced by 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 has, and merged().

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

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

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

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

Is there an option with a RealOptionKey?

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

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

Is there an option with a StringOptionKey?

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

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

Is there an option with a FileOptionKey?

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

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

Is there an option with an AnyOptionKey?

References 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]

Is there an option with a RealVectorOptionKey?

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

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

Is there an option with a FileVectorOptionKey?

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

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

Is there an option with a PathVectorOptionKey?

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

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

Is there an option with an AnyVectorOptionKey?

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

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

Is there an option with an OptionKey?

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

void utility::options::OptionCollection::load ( int const  argc,
char *const  argv[],
bool const  free_args = false 
)
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 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 = "" 
)
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(), basic::options::OptionKeys::ddg::min, n_part(), basic::options::OptionKeys::out::file::o, prefix(), suffix(), sd::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 basic::options::OptionKeys::ddg::min, n_part(), and prefix().

Referenced by find_key_cl().

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]
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]
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 by AnyOptionKey.

References operator[]().

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

Option by AnyOptionKey.

References operator[]().

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

Option by AnyOptionKey with option type template argument.

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

Option by AnyOptionKey with option type template argument.

BooleanVectorOption const& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key) const [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]
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]
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]
template<typename VectorOptionType >
VectorOptionType const& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key) const [inline]

VectorOption by AnyVectorOptionKey with option type template argument.

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

VectorOption by AnyVectorOptionKey with option type template argument.

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

Option by OptionKey.

References operator[]().

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

Option by OptionKey with option type template argument.

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

Option by OptionKey with option type template argument.

FileVectorOption& utility::options::OptionCollection::operator() ( FileVectorOptionKey const &  key) [inline]
BooleanVectorOption& utility::options::OptionCollection::operator() ( BooleanVectorOptionKey const &  key) [inline]
FileOption& utility::options::OptionCollection::operator() ( FileOptionKey const &  key) [inline]
Option& utility::options::OptionCollection::operator() ( OptionKey const &  key) [inline]

Option by OptionKey.

References operator[]().

RealOption& utility::options::OptionCollection::operator() ( RealOptionKey const &  key) [inline]
VectorOption& utility::options::OptionCollection::operator() ( AnyVectorOptionKey const &  key) [inline]
FileVectorOption& utility::options::OptionCollection::operator[] ( FileVectorOptionKey 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 utility::down_cast(), and key.

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

OptionCollection[ AnyVectorOptionKey ] with option type template argument.

References utility::down_cast(), and key.

Option const& utility::options::OptionCollection::operator[] ( OptionKey const &  key) const [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[]().

VectorOption& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key) [inline]
RealVectorOption& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key) [inline]
Option& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key) [inline]
BooleanVectorOption& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key) [inline]
FileOption& utility::options::OptionCollection::operator[] ( FileOptionKey const &  key) [inline]
RealOption& utility::options::OptionCollection::operator[] ( RealOptionKey const &  key) [inline]
Option& utility::options::OptionCollection::operator[] ( OptionKey const &  key) [inline]
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]
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]
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]
template<typename OptionType >
OptionType const& utility::options::OptionCollection::operator[] ( AnyOptionKey const &  key) const [inline]

OptionCollection[ AnyOptionKey ] with option type template argument.

References utility::down_cast(), and key.

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

OptionCollection[ AnyOptionKey ] with option type template argument.

References utility::down_cast(), and key.

BooleanVectorOption const& utility::options::OptionCollection::operator[] ( BooleanVectorOptionKey const &  key) const [inline]
IntegerVectorOption const& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key) const [inline]
IntegerVectorOption& utility::options::OptionCollection::operator[] ( IntegerVectorOptionKey const &  key) [inline]
VectorOption const& utility::options::OptionCollection::operator[] ( AnyVectorOptionKey const &  key) const [inline]
PathVectorOption& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key) [inline]
RealVectorOption const& utility::options::OptionCollection::operator[] ( RealVectorOptionKey const &  key) const [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]
PathVectorOption const& utility::options::OptionCollection::operator[] ( PathVectorOptionKey const &  key) const [inline]
template<typename OptionType >
OptionType& utility::options::OptionCollection::option ( OptionKey const &  key) [inline]

Option by OptionKey with option type template argument.

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

Option by AnyOptionKey.

References operator[]().

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

VectorOption by AnyVectorOptionKey with option type template argument.

RealOption& utility::options::OptionCollection::option ( RealOptionKey const &  key) [inline]
BooleanVectorOption const& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key) const [inline]
IntegerOption const& utility::options::OptionCollection::option ( IntegerOptionKey const &  key) const [inline]
StringOption const& utility::options::OptionCollection::option ( StringOptionKey const &  key) const [inline]
BooleanOption const& utility::options::OptionCollection::option ( BooleanOptionKey const &  key) const [inline]
BooleanVectorOption& utility::options::OptionCollection::option ( BooleanVectorOptionKey const &  key) [inline]
PathVectorOption const& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key) const [inline]
FileVectorOption& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key) [inline]
StringVectorOption& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key) [inline]
FileVectorOption const& utility::options::OptionCollection::option ( FileVectorOptionKey const &  key) const [inline]
StringVectorOption const& utility::options::OptionCollection::option ( StringVectorOptionKey const &  key) const [inline]
PathOption& utility::options::OptionCollection::option ( PathOptionKey const &  key) [inline]
VectorOption const& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) const [inline]
FileOption const& utility::options::OptionCollection::option ( FileOptionKey const &  key) const [inline]
VectorOption& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) [inline]
IntegerVectorOption& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key) [inline]
IntegerOption& utility::options::OptionCollection::option ( IntegerOptionKey const &  key) [inline]
IntegerVectorOption const& utility::options::OptionCollection::option ( IntegerVectorOptionKey const &  key) const [inline]
template<typename OptionType >
OptionType& utility::options::OptionCollection::option ( AnyOptionKey const &  key) [inline]

Option by AnyOptionKey with option type template argument.

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

Option by AnyOptionKey.

References operator[]().

RealOption const& utility::options::OptionCollection::option ( RealOptionKey const &  key) const [inline]
PathVectorOption& utility::options::OptionCollection::option ( PathVectorOptionKey const &  key) [inline]
template<typename OptionType >
OptionType const& utility::options::OptionCollection::option ( AnyOptionKey const &  key) const [inline]

Option by AnyOptionKey with option type template argument.

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

Option by OptionKey with option type template argument.

RealVectorOption& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key) [inline]
StringOption& utility::options::OptionCollection::option ( StringOptionKey const &  key) [inline]
template<typename VectorOptionType >
VectorOptionType& utility::options::OptionCollection::option ( AnyVectorOptionKey const &  key) [inline]

VectorOption by AnyVectorOptionKey with option type template argument.

BooleanOption& utility::options::OptionCollection::option ( BooleanOptionKey const &  key) [inline]
FileOption& utility::options::OptionCollection::option ( FileOptionKey const &  key) [inline]
RealVectorOption const& utility::options::OptionCollection::option ( RealVectorOptionKey const &  key) const [inline]
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[]().

std::string utility::options::OptionCollection::prefix ( std::string const &  s,
int const  n = 1 
) [static]
static void utility::options::OptionCollection::set_show_accessed_options_flag ( bool  v) [inline, static]

modify 'show_accessed_options' flag;

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) const

Show all the options and their descriptions.

References begin, end, color_pdb::i, key, and show_option_help().

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

Show all the options and their descriptions in a hierarchy format.

References ObjexxFCL::fmt::A(), begin, COL1, COL2, COL3, end, color_pdb::i, key, ObjexxFCL::fmt::LJ(), ObjexxFCL::fmt::RJ(), and show_option_help_heir().

Referenced by load().

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 
) const
void utility::options::OptionCollection::show_option_help_heir ( OptionKey const &  key,
std::string &  group,
std::ostream &  stream 
) const
void utility::options::OptionCollection::show_table_text ( std::ostream &  stream) const
void utility::options::OptionCollection::show_table_Wiki ( std::ostream &  stream) const

Show the options definitions table in Wiki format.

Note:
Based on Sergey Lyskov's Python Wiki table generator code

References begin, utility::options::Option::default_string(), utility::options::Option::description(), end, has(), color_pdb::i, utility::options::Option::id(), key, utility::options::Option::legal_string(), option(), prefix(), suffix(), and utility::options::Option::type_string().

Referenced by load().

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 
) [inline, static]

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]
static std::string utility::options::OptionCollection::tab_prefixed ( std::string const &  s,
int const  n = 1 
) [inline, static]

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 color_pdb::i, 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 color_pdb::i, 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 const  indent = 10,
std::string::size_type const  width = 80 
) [static]

Friends And Related Function Documentation

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

Output to stream.


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