|
libzypp
9.1.2
|
xmlChar * wrapper.
More...
#include <XmlString.h>
Classes | |
| struct | Deleter |
shared_ptr custom deleter calling xmlFree. More... | |
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 * | get () const |
Access the xmlChar *. | |
| operator const xmlChar * () const | |
Implicit conversion to xmlChar *. | |
| const char * | c_str () const |
Explicit conversion to const char *. | |
| 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) |
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 40 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* zypp::xml::XmlString::get | ( | ) | const [inline] |
Access the xmlChar *.
Definition at line 61 of file XmlString.h.
References _xmlstr.
Referenced by zypp::parser::RepoindexFileReader::Impl::consumeNode().
| zypp::xml::XmlString::operator const xmlChar * | ( | ) | const [inline] |
Implicit conversion to xmlChar *.
Definition at line 69 of file XmlString.h.
| const char* zypp::xml::XmlString::c_str | ( | ) | const [inline] |
Explicit conversion to const char *.
Definition at line 73 of file XmlString.h.
Referenced by asString(), operator!=(), zypp::xml::operator<<(), operator==(), zypp::xml::ParseDef::Impl::skipNode(), and zypp::xml::parse_def_assign::Consumer::text().
| std::string zypp::xml::XmlString::asString | ( | ) | const [inline] |
Explicit conversion to std::string.
Definition at line 77 of file XmlString.h.
References _xmlstr, and c_str().
Referenced by zypp::parser::ws::WebpinResultFileReader::Impl::consumeNode(), zypp::parser::RepoindexFileReader::Impl::consumeNode(), zypp::parser::yum::PatchesFileReader::Impl::consumeNode(), zypp::parser::yum::RepomdFileReader::Impl::consumeNode(), operator!=(), operator==(), zypp::xml::ParseDef::Impl::skipNode(), and zypp::xml::ParseDef::Impl::take().
| bool zypp::xml::XmlString::operator== | ( | const std::string & | rhs | ) | const [inline] |
Definition at line 84 of file XmlString.h.
References c_str().
| bool zypp::xml::XmlString::operator!= | ( | const std::string & | rhs | ) | const [inline] |
Definition at line 87 of file XmlString.h.
References c_str().
| bool zypp::xml::XmlString::operator== | ( | const char *const | rhs | ) | const [inline] |
Definition at line 90 of file XmlString.h.
References asString().
| bool zypp::xml::XmlString::operator!= | ( | const char *const | rhs | ) | const [inline] |
Definition at line 93 of file XmlString.h.
References asString().
| bool zypp::xml::XmlString::operator== | ( | const XmlString & | rhs | ) | const [inline] |
Definition at line 96 of file XmlString.h.
References asString(), and c_str().
| bool zypp::xml::XmlString::operator!= | ( | const XmlString & | rhs | ) | const [inline] |
Definition at line 99 of file XmlString.h.
References asString(), and c_str().
| std::ostream & operator<< | ( | std::ostream & | str, |
| const XmlString & | obj | ||
| ) | [related] |
Stream output.
Definition at line 46 of file XmlString.cc.
shared_ptr<const xmlChar> zypp::xml::XmlString::_xmlstr [private] |
Wraps the xmlChar *.
The appropriate custom deleter is set by the ctor.
Definition at line 105 of file XmlString.h.
Referenced by asString(), get(), and XmlString().
1.7.6.1