xmlChar * wrapper.
More...
#include <XmlString.h>
Public Types | |
| enum | OnDelete { NOFREE, FREE } |
| Dtor policy. More... | |
Public Member Functions | |
| XmlString (const xmlChar *const xmlstr_r=NULL, OnDelete ondelete_r=NOFREE) | |
| Ctor from xmlChar. | |
| const xmlChar *const | get () const |
Access the xmlChar *. | |
| operator const xmlChar *const () const | |
Implicit conversion to xmlChar *. | |
| const char *const | c_str () const |
Explicit conversion to const char *const. | |
| std::string | asString () const |
Explicit conversion to std::string. | |
| bool | operator== (const std::string &rhs) const |
| bool | operator!= (const std::string &rhs) const |
| bool | operator== (const char *const rhs) const |
| bool | operator!= (const char *const rhs) const |
| bool | operator== (const XmlString &rhs) const |
| bool | operator!= (const XmlString &rhs) const |
Private Attributes | |
| shared_ptr< const xmlChar > | _xmlstr |
Wraps the xmlChar *. | |
Related Functions | |
| (Note that these are not member functions.) | |
| std::ostream & | operator<< (std::ostream &str, const XmlString &obj) |
| Stream output. | |
Classes | |
| struct | Deleter |
shared_ptr custom deleter calling xmlFree. More... | |
xmlChar * wrapper.
Common handling of xmlChar * that do or do not need to be freed. If the wraped xmlChar * needs to be freed by calling xmlFree, pass FREE as 2nd argument to the ctor.
Definition at line 39 of file XmlString.h.
| zypp::xml::XmlString::XmlString | ( | const xmlChar *const | xmlstr_r = NULL, |
|
| OnDelete | ondelete_r = NOFREE | |||
| ) |
Ctor from xmlChar.
Pass FREE as 2nd arg if xmlFree needs to be called on destruction.
Definition at line 29 of file XmlString.cc.
| const xmlChar* const zypp::xml::XmlString::get | ( | ) | const [inline] |
| zypp::xml::XmlString::operator const xmlChar *const | ( | ) | const [inline] |
| const char* const zypp::xml::XmlString::c_str | ( | ) | const [inline] |
Explicit conversion to const char *const.
Definition at line 72 of file XmlString.h.
Referenced by asString(), operator!=(), zypp::xml::operator<<(), and operator==().
| std::string zypp::xml::XmlString::asString | ( | ) | const [inline] |
Explicit conversion to std::string.
Definition at line 76 of file XmlString.h.
References _xmlstr, and c_str().
Referenced by zypp::parser::yum::PatchFileReader::Impl::consumeDeltarpmNode(), zypp::parser::yum::FileReaderBase::BaseImpl::consumeFormatNode(), zypp::parser::yum::PatchFileReader::Impl::consumeMessageNode(), zypp::parser::yum::RepomdFileReader::Impl::consumeNode(), zypp::parser::yum::ProductFileReader::Impl::consumeNode(), zypp::parser::yum::PatchFileReader::Impl::consumeNode(), zypp::parser::yum::PatchesFileReader::Impl::consumeNode(), zypp::parser::yum::OtherFileReader::Impl::consumeNode(), zypp::parser::yum::FilelistsFileReader::Impl::consumeNode(), zypp::parser::yum::PatternFileReader::Impl::consumeNode(), zypp::parser::yum::PatchFileReader::Impl::consumePackageNode(), zypp::parser::yum::FileReaderBase::BaseImpl::consumePackageNode(), zypp::parser::yum::PatchFileReader::Impl::consumePatchrpmNode(), zypp::parser::yum::PatchFileReader::Impl::consumeScriptNode(), operator!=(), and operator==().
| bool zypp::xml::XmlString::operator== | ( | const std::string & | rhs | ) | const [inline] |
| bool zypp::xml::XmlString::operator!= | ( | const std::string & | rhs | ) | const [inline] |
| bool zypp::xml::XmlString::operator== | ( | const char *const | rhs | ) | const [inline] |
| bool zypp::xml::XmlString::operator!= | ( | const char *const | rhs | ) | const [inline] |
| bool zypp::xml::XmlString::operator== | ( | const XmlString & | rhs | ) | const [inline] |
| bool zypp::xml::XmlString::operator!= | ( | const XmlString & | rhs | ) | const [inline] |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const XmlString & | obj | |||
| ) | [related] |
shared_ptr<const xmlChar> zypp::xml::XmlString::_xmlstr [private] |
Wraps the xmlChar *.
The appropriate custom deleter is set by the ctor.
Definition at line 104 of file XmlString.h.
Referenced by asString(), get(), and XmlString().
1.5.3