![]() |
Rosetta
2021.16
|
#include <Tag.hh>

Public Types | |
| typedef std::map< std::string, std::string > | options_t |
| typedef utility::vector0< TagCOP > | tags_t |
Public Member Functions | |
| ~Tag () override | |
| Automatically generated virtual destructor for class deriving directly from VirtualBase. More... | |
| Tag () | |
| TagCOP | get_self_ptr () const |
| self pointers More... | |
| TagOP | get_self_ptr () |
| TagCAP | get_self_weak_ptr () const |
| TagAP | get_self_weak_ptr () |
| void | clear () |
| size_t | size () const |
| void | setName (std::string const &name) |
| std::string const & | getName () const |
| TagCAP const & | getParent () const |
| void | addTag (TagOP tag) |
| utility::vector0< TagCOP > const & | getTags () const |
| utility::vector0< TagCOP > const & | getTags (std::string const &name) const |
| TagCOP const & | getTag (std::string const &name) const |
| bool | hasTag (std::string const &name) const |
| Does the Tag have a specific sub-tag (branch) within (such as a MoveMap, etc.)? More... | |
| bool | hasOption (std::string const &key) const |
| Does the Tag have a specific option? More... | |
| template<class T > | |
| void | setOption (std::string const &key, T const &value) |
| void | setAccessed (std::string const &key) const |
| Set the 'accessed' annotation of this option, without bothering to get the value. Used to prevent no-longer relevant options from crashing the XML parsing. More... | |
| template<class T > | |
| T | getOption (std::string const &key, T const &t_default) const |
| Retrieve an option from the Tag with the given key name, using the provided default value (t_default) if the option is not present in the tag. More... | |
| template<class T > | |
| T | getOption (std::string const &, int const ) const =delete |
| Variant that will only be defined for Sizes. More... | |
| template<class T > | |
| T | getOption (std::string const &key, char const *default_as_string_literal) const =delete |
| Variant for the case in which the developer has mistakenly provided a string literal instead of a value of type T. For anything but a boolean or a string type, this produces a compilation error. More... | |
| template<class T > | |
| T | getOption (std::string const &key) const |
| Retrieve an option from the Tag with the given key name. More... | |
| options_t const & | getOptions () const |
| void | setOptions (options_t const &options) |
| void | read (std::istream &in) |
| void | read (std::string const &tag_string) |
| void | write (std::ostream &out, int num_tabs=0) const |
| std::string | to_string (int num_tabs=0) const |
| returns the string that would be written by write() More... | |
| TagCOP const & | operator[] (std::string const &key) const |
| Tag & | operator= (Tag const &other) |
| void | reset_accessed_options () const |
| Recursively reset that accessed_options_ variable so that a re-parsing of the tag can identify options that have been given but that have not been read. More... | |
| void | die_for_unaccessed_options () const |
| void | die_for_unaccessed_options_recursively () const |
| TagOP | clone () const |
| void | set_quote_options (bool const quote_options_val) |
| if true, options will be quoted when the tag is outputted if false, options will be left as-is (default) More... | |
| template<> | |
| bool | getOption (std::string const &key, bool const &t_default) const |
| template<> | |
| bool | getOption (std::string const &key, char const *default_as_string_literal) const |
| This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false. More... | |
| template<> | |
| bool | getOption (std::string const &key) const |
| template<> | |
| AutoBool | getOption (std::string const &key, AutoBool const &t_default) const |
| template<> | |
| AutoBool | getOption (std::string const &key, char const *default_as_string_literal) const |
| This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false. More... | |
| template<> | |
| AutoBool | getOption (std::string const &key) const |
| template<> | |
| int | getOption (std::string const &key, int const default_int) const |
| Special-casing for signed ints. More... | |
| template<> | |
| int64_t | getOption (std::string const &key, int const default_int) const |
| Special-casing for int64_t. More... | |
| template<> | |
| bool | getOption (std::string const &key, bool const &t_default) const |
| This is explicit specialization for boolean values to allow for use of "true" "false" etc. in addition to 1 and 0. More... | |
| template<> | |
| bool | getOption (std::string const &key, char const *default_as_string_literal) const |
| This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false. More... | |
| template<> | |
| bool | getOption (std::string const &key) const |
| template<> | |
| AutoBool | getOption (std::string const &key, AutoBool const &t_default) const |
| template<> | |
| AutoBool | getOption (std::string const &key, char const *default_as_string_literal) const |
| This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false. More... | |
| template<> | |
| AutoBool | getOption (std::string const &key) const |
| template<> | |
| std::string | getOption (std::string const &key, char const *default_as_string_literal) const |
| Special-casing the string literal version for string options. In this case, there shouldn't be an error thrown. A string literal should be allowed to set the default value for a string. More... | |
| template<> | |
| platform::Size | getOption (std::string const &key, int const default_int) const |
| Special-casing to ensure that 0 gets interpreted as Size(0) rather than nullptr. More... | |
| template<> | |
| int | getOption (std::string const &key, int const default_int) const |
| Special-casing for signed ints. More... | |
| template<> | |
| int64_t | getOption (std::string const &key, int const default_int) const |
| Special-casing for int64_t. 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 | |
| VirtualBase & | operator= (VirtualBase const &)=default |
| VirtualBase & | operator= (VirtualBase &&)=default |
Static Public Member Functions | |
| static TagOP | create (std::istream &in) |
| static TagOP | create (std::string const &instring) |
Private Attributes | |
| std::string | name_ |
| options_t | mOptions_ |
| options_t | accessed_options_ |
| tags_t | vTags_ |
| std::map< std::string, tags_t > | mvTags_ |
| TagCAP | parentTag_ |
| bool | quote_options_ |
| if true, options will be quoted when the tag is outputted (default) if false, options will be left without quotes More... | |
Static Private Attributes | |
| static utility::vector0 < TagCOP > const | vEmpty_ |
| typedef std::map<std::string, std::string > utility::tag::Tag::options_t |
|
overridedefault |
Automatically generated virtual destructor for class deriving directly from VirtualBase.
Auto-generated virtual destructor
| utility::tag::Tag::Tag | ( | ) |
Referenced by operator=().
| void utility::tag::Tag::addTag | ( | TagOP | tag | ) |
References get_self_weak_ptr(), mvTags_, and vTags_.
Referenced by operator=().
| void utility::tag::Tag::clear | ( | ) |
References mOptions_, mvTags_, name_, parentTag_, and vTags_.
Referenced by operator=().
| TagOP utility::tag::Tag::clone | ( | ) | const |
|
static |
|
static |
References basic::options::OptionKeys::in::in.
| void utility::tag::Tag::die_for_unaccessed_options | ( | ) | const |
References accessed_options_, utility::io::oc::cerr, mOptions_, name_, option, and utility_exit_with_message.
Referenced by die_for_unaccessed_options_recursively().
| void utility::tag::Tag::die_for_unaccessed_options_recursively | ( | ) | const |
References begin, die_for_unaccessed_options(), and vTags_.
|
inline |
self pointers
|
inline |
|
inline |
|
inline |
References name_.
Referenced by add_protocols(), and reverse_convert().
|
inline |
Retrieve an option from the Tag with the given key name, using the provided default value (t_default) if the option is not present in the tag.
| Throws | a utility::excn::EXCN_Msg_Exception if the boost::lexical_cast fails to convert the input type as requested. |
References accessed_options_, CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, basic::options::OptionKeys::cloud::key, and mOptions_.
Variant that will only be defined for Sizes.
|
delete |
Variant for the case in which the developer has mistakenly provided a string literal instead of a value of type T. For anything but a boolean or a string type, this produces a compilation error.
|
inline |
Retrieve an option from the Tag with the given key name.
| Throws | a utility::excn::EXCN_Msg_Exception if the an option with the given key is not present, or if the boost::lexical_cast fails to convert the input type as requested. |
References accessed_options_, CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, basic::options::OptionKeys::cloud::key, mOptions_, and pyrosetta.distributed.cluster.exceptions::T.
| bool utility::tag::Tag::getOption | ( | std::string const & | key, |
| bool const & | t_default | ||
| ) | const |
This is explicit specialization for boolean values to allow for use of "true" "false" etc. in addition to 1 and 0.
| bool utility::tag::Tag::getOption | ( | std::string const & | key, |
| char const * | default_as_string_literal | ||
| ) | const |
This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false.
| bool utility::tag::Tag::getOption | ( | std::string const & | key | ) | const |
| AutoBool utility::tag::Tag::getOption | ( | std::string const & | key, |
| AutoBool const & | t_default | ||
| ) | const |
| AutoBool utility::tag::Tag::getOption | ( | std::string const & | key, |
| char const * | default_as_string_literal | ||
| ) | const |
This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false.
| AutoBool utility::tag::Tag::getOption | ( | std::string const & | key | ) | const |
| std::string utility::tag::Tag::getOption | ( | std::string const & | key, |
| char const * | default_as_string_literal | ||
| ) | const |
Special-casing the string literal version for string options. In this case, there shouldn't be an error thrown. A string literal should be allowed to set the default value for a string.
| bool utility::tag::Tag::getOption | ( | std::string const & | key, |
| bool const & | t_default | ||
| ) | const |
This is explicit specialization for boolean values to allow for use of "true" "false" etc. in addition to 1 and 0
| Throws | a utility::excn::EXCN_Msg_Exception if the option is proviced, but the string that's given is not a valid true/false string (either "true", "false", "1" or "0"). |
References CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, utility::is_false_string(), utility::is_true_string(), and basic::options::OptionKeys::cloud::key.
| platform::Size utility::tag::Tag::getOption | ( | std::string const & | key, |
| int const | default_int | ||
| ) | const |
Special-casing to ensure that 0 gets interpreted as Size(0) rather than nullptr.
| bool utility::tag::Tag::getOption | ( | std::string const & | key, |
| char const * | default_as_string_literal | ||
| ) | const |
This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false.
References CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, utility::is_false_string(), utility::is_true_string(), basic::options::OptionKeys::cloud::key, and runtime_assert_string_msg.
| int utility::tag::Tag::getOption | ( | std::string const & | key, |
| int const | default_int | ||
| ) | const |
Special-casing for signed ints.
| int64_t utility::tag::Tag::getOption | ( | std::string const & | key, |
| int const | default_int | ||
| ) | const |
Special-casing for int64_t.
| bool utility::tag::Tag::getOption | ( | std::string const & | key | ) | const |
| Throws | a utility::excn::EXCN_Msg_Exception if none of the accepted boolean strings is provided. |
References CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, utility::is_false_string(), utility::is_true_string(), and basic::options::OptionKeys::cloud::key.
| AutoBool utility::tag::Tag::getOption | ( | std::string const & | key, |
| char const * | default_as_string_literal | ||
| ) | const |
This is for the variant in which someone has specified a default using "true" instead of true, or "false" instead of false.
References utility::tag::Auto, CREATE_EXCEPTION, utility::tag::False, test.T150_PyMOL_Integration::i, utility::is_false_string(), utility::is_true_string(), basic::options::OptionKeys::cloud::key, runtime_assert_string_msg, utility::tag::True, and utility::upper().
| AutoBool utility::tag::Tag::getOption | ( | std::string const & | key | ) | const |
| Throws | a utility::excn::EXCN_Msg_Exception if none of the accepted boolean strings is provided. |
References utility::tag::Auto, CREATE_EXCEPTION, utility::tag::False, test.T150_PyMOL_Integration::i, utility::is_false_string(), utility::is_true_string(), basic::options::OptionKeys::cloud::key, utility::tag::True, and utility::upper().
| int utility::tag::Tag::getOption | ( | std::string const & | key, |
| int const | default_int | ||
| ) | const |
Special-casing for signed ints.
References CREATE_EXCEPTION, test.T150_PyMOL_Integration::i, and basic::options::OptionKeys::cloud::key.
| int64_t utility::tag::Tag::getOption | ( | std::string const & | key, |
| int const | default_int | ||
| ) | const |
Special-casing for int64_t.
References basic::options::OptionKeys::cloud::key.
| Tag::options_t const & utility::tag::Tag::getOptions | ( | ) | const |
References mOptions_.
|
inline |
References parentTag_.
| TagCOP const & utility::tag::Tag::getTag | ( | std::string const & | name | ) | const |
References CREATE_EXCEPTION, getTags(), and test.T850_SubClassing::v.
Referenced by operator[]().
| utility::vector0< TagCOP > const & utility::tag::Tag::getTags | ( | ) | const |
References vTags_.
Referenced by add_protocols(), getTag(), hasTag(), and reverse_convert().
| utility::vector0< TagCOP > const & utility::tag::Tag::getTags | ( | std::string const & | name | ) | const |
References test.T150_PyMOL_Integration::i, mvTags_, and vEmpty_.
| bool utility::tag::Tag::hasOption | ( | std::string const & | key | ) | const |
Does the Tag have a specific option?
References test.T150_PyMOL_Integration::i, and mOptions_.
| bool utility::tag::Tag::hasTag | ( | std::string const & | name | ) | const |
| void utility::tag::Tag::read | ( | std::istream & | in | ) |
References ObjexxFCL::read().
| void utility::tag::Tag::read | ( | std::string const & | tag_string | ) |
References begin, CREATE_EXCEPTION, basic::options::OptionKeys::cutoutdomain::end, and tag.
| void utility::tag::Tag::reset_accessed_options | ( | ) | const |
Recursively reset that accessed_options_ variable so that a re-parsing of the tag can identify options that have been given but that have not been read.
References accessed_options_, and vTags_.
| void utility::tag::Tag::set_quote_options | ( | bool const | quote_options_val | ) |
if true, options will be quoted when the tag is outputted if false, options will be left as-is (default)
| [in] | quote_options_val | Whether or not option values should be quoted. Default=false |
| [in] | quote_options_val | Whether or not option values should be quoted. Default=true |
|
inline |
Set the 'accessed' annotation of this option, without bothering to get the value. Used to prevent no-longer relevant options from crashing the XML parsing.
References accessed_options_, and basic::options::OptionKeys::cloud::key.
|
inline |
| void utility::tag::Tag::setOptions | ( | options_t const & | options | ) |
References accessed_options_, mOptions_, and options.
| size_t utility::tag::Tag::size | ( | ) | const |
References vTags_.
| std::string utility::tag::Tag::to_string | ( | int | num_tabs = 0 | ) | const |
returns the string that would be written by write()
References basic::options::OptionKeys::mh::match::ss, and write().
| void utility::tag::Tag::write | ( | std::ostream & | out, |
| int | num_tabs = 0 |
||
| ) | const |
References mOptions_, name_, quote_options_, tag, and vTags_.
Referenced by utility::tag::operator<<(), and to_string().
|
mutableprivate |
Referenced by die_for_unaccessed_options(), getOption(), reset_accessed_options(), setAccessed(), setOption(), and setOptions().
|
private |
Referenced by clear(), die_for_unaccessed_options(), getOption(), getOptions(), hasOption(), operator=(), setOption(), setOptions(), and write().
|
private |
|
private |
Referenced by clear(), die_for_unaccessed_options(), getName(), operator=(), setName(), and write().
|
private |
Referenced by clear(), and getParent().
|
private |
if true, options will be quoted when the tag is outputted (default) if false, options will be left without quotes
Referenced by write().
|
staticprivate |
Referenced by getTags().
|
private |
Referenced by addTag(), clear(), die_for_unaccessed_options_recursively(), getTags(), operator=(), reset_accessed_options(), size(), and write().
1.8.7