![]() |
Rosetta Utilities
2014.16.56682
|
#include <Tag.hh>
Public Types | |
| typedef std::map< std::string, std::string > | options_t |
| typedef utility::vector0< TagCOP > | tags_t |
Public Types inherited from utility::pointer::ReferenceCount | |
| typedef platform::Size | Size |
| typedef platform::Size | size_type |
Public Member Functions | |
| virtual | ~Tag () |
| Automatically generated virtual destructor for class deriving directly from ReferenceCount. More... | |
| Tag () | |
| void | clear () |
| size_t | size () const |
| void | setName (std::string const &name) |
| std::string const & | getName () const |
| TagCOP 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 |
| bool | hasOption (std::string const &key) const |
| template<class T > | |
| void | setOption (std::string const &key, T const &value) |
| 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 &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 | write (std::ostream &out, int num_tabs=0) const |
| TagCOP const & | operator[] (std::string const &key) const |
| void | die_for_unaccessed_options () const |
| void | die_for_unaccessed_options_recursively () const |
| TagOP | clone () const |
| template<> | |
| bool | getOption (std::string const &key, bool const &t_default) const |
| template<> | |
| bool | getOption (std::string const &key) const |
| template<> | |
| bool | getOption (std::string const &key, bool const &t_default) const |
| template<> | |
| bool | getOption (std::string const &key) const |
Public Member Functions inherited from utility::pointer::ReferenceCount | |
| void | ctor () |
| virtual | ~ReferenceCount () |
| Destructor. More... | |
| Size | ref_count () const |
| Reference count. More... | |
Static Public Member Functions | |
| static TagOP | create (std::istream &in) |
| static TagOP | create (std::string instring) |
Private Attributes | |
| std::string | name_ |
| options_t | mOptions_ |
| options_t | accessed_options_ |
| tags_t | vTags_ |
| std::map< std::string, tags_t > | mvTags_ |
| TagCOP | parentTag_ |
Static Private Attributes | |
| static utility::vector0 < TagCOP > const | vEmpty_ |
Additional Inherited Members | |
Protected Member Functions inherited from utility::pointer::ReferenceCount | |
| ReferenceCount () | |
| Default constructor. More... | |
| ReferenceCount (ReferenceCount const &) | |
| Copy constructor. More... | |
| ReferenceCount & | operator= (ReferenceCount const &) |
| Copy assignment. More... | |
| typedef std::map<std::string, std::string > utility::tag::Tag::options_t |
|
virtual |
Automatically generated virtual destructor for class deriving directly from ReferenceCount.
Auto-generated virtual destructor
| utility::tag::Tag::Tag | ( | ) |
| void utility::tag::Tag::addTag | ( | TagOP | tag | ) |
| void utility::tag::Tag::clear | ( | ) |
|
static |
References basic::options::OptionKeys::in::in.
| void utility::tag::Tag::die_for_unaccessed_options | ( | ) | const |
References utility::io::oc::cerr, option, and utility_exit_with_message.
| void utility::tag::Tag::die_for_unaccessed_options_recursively | ( | ) | const |
References basic::options::OptionKeys::begin.
|
inline |
References name_.
|
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_, basic::options::OptionKeys::key, mOptions_, and basic::T().
|
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_, basic::options::OptionKeys::key, mOptions_, and basic::T().
| bool utility::tag::Tag::getOption | ( | std::string const & | key, |
| bool const & | t_default | ||
| ) | const |
| bool utility::tag::Tag::getOption | ( | std::string const & | key | ) | const |
| 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 utility::is_false_string(), utility::is_true_string(), and basic::options::OptionKeys::key.
| 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 utility::is_false_string(), utility::is_true_string(), and basic::options::OptionKeys::key.
| Tag::options_t const & utility::tag::Tag::getOptions | ( | ) | const |
|
inline |
References parentTag_.
| TagCOP const & utility::tag::Tag::getTag | ( | std::string const & | name | ) | const |
| utility::vector0< TagCOP > const & utility::tag::Tag::getTags | ( | ) | const |
| utility::vector0< TagCOP > const & utility::tag::Tag::getTags | ( | std::string const & | name | ) | const |
| bool utility::tag::Tag::hasOption | ( | std::string const & | key | ) | const |
| bool utility::tag::Tag::hasTag | ( | std::string const & | name | ) | const |
| TagCOP const & utility::tag::Tag::operator[] | ( | std::string const & | key | ) | const |
| void utility::tag::Tag::read | ( | std::istream & | in | ) |
| void utility::tag::Tag::setName | ( | std::string const & | name | ) |
References name.
|
inline |
| size_t utility::tag::Tag::size | ( | ) | const |
| void utility::tag::Tag::write | ( | std::ostream & | out, |
| int | num_tabs = 0 |
||
| ) | const |
References tag.
Referenced by utility::tag::operator<<().
|
mutableprivate |
Referenced by getOption(), and setOption().
|
private |
Referenced by getOption(), and setOption().
|
private |
|
private |
Referenced by getName().
|
private |
Referenced by getParent().
|
staticprivate |
|
private |
1.8.7