#include <xml2.h>
Inheritance diagram for wxXml2Namespace:
In this example:
<root xmlns="http://!www.w3.org/1999/xhtml"> <e:child xmlns:e="http://!mysite.com/mynamespaces/e/"> <e:subchild>content</e:subchild> </e:child> <child2 prop="value"/> </root>
Public Member Functions | |
wxXml2Namespace () | |
Constructs an empty namespace. It cannot be used until you Create() it. | |
wxXml2Namespace (const wxString &prefix, const wxString &uri, wxXml2Node &owner=wxXml2EmptyNode) | |
Constructs a namespaces and eventually set it as the namespace used by 'owner'. | |
wxXml2Namespace (xmlNs *ns, wxXml2Node &owner) | |
Wraps a libxml2 namespace structure. | |
wxXml2Namespace (const wxXml2Namespace &ns) | |
Copies the given wrapper (does not imply the XML structure copy). | |
virtual | ~wxXml2Namespace () |
Destroys this namespace if it is completely unlinked from a greater XML tree. | |
bool | operator== (const wxXml2Namespace &ns) const |
bool | operator!= (const wxXml2Namespace &p) const |
wxXml2Namespace & | operator= (const wxXml2Namespace &n) |
void | Create (const wxString &prefix, const wxString &uri, wxXml2Node &owner) |
Creates a new namespace and eventually attach it to the given node. | |
bool | IsUnlinked () const |
Returns TRUE if this element is unlinked. | |
bool | IsNonEmpty () const |
Returns TRUE if this object is wrapping a non-NULL object. | |
wxString | GetPrefix () const |
wxString | GetURI () const |
xmlNs * | GetObj () const |
Returns the associated XML structure. | |
void | SetPrefix (const wxString &p) |
void | SetURI (const wxString &u) |
Protected Member Functions | |
void | Destroy () |
Destroys the data wrapped by this class freeing its memory. | |
void | SetAsEmpty () |
Sets this element as empty: that is wrapping a NULL pointer. | |
void | Copy (const wxXml2Namespace &ns) |
int & | GetPrivate () const |
Returns the private member of the wrapped structure. |
wxXml2Namespace::wxXml2Namespace | ( | ) | [inline] |
Constructs an empty namespace. It cannot be used until you Create() it.
wxXml2Namespace::wxXml2Namespace | ( | const wxString & | prefix, | |
const wxString & | uri, | |||
wxXml2Node & | owner = wxXml2EmptyNode | |||
) | [inline] |
Constructs a namespaces and eventually set it as the namespace used by 'owner'.
If 'owner' == wxXml2EmptyNode, then the namespace won't be attached to any XML tree. Use SetOwner to attach it to a specific node.
wxXml2Namespace::wxXml2Namespace | ( | xmlNs * | ns, | |
wxXml2Node & | owner | |||
) |
Wraps a libxml2 namespace structure.
wxXml2Namespace::wxXml2Namespace | ( | const wxXml2Namespace & | ns | ) | [inline] |
Copies the given wrapper (does not imply the XML structure copy).
virtual wxXml2Namespace::~wxXml2Namespace | ( | ) | [inline, virtual] |
Destroys this namespace if it is completely unlinked from a greater XML tree.
void wxXml2Namespace::Copy | ( | const wxXml2Namespace & | ns | ) | [inline, protected] |
void wxXml2Namespace::Create | ( | const wxString & | prefix, | |
const wxString & | uri, | |||
wxXml2Node & | owner | |||
) |
Creates a new namespace and eventually attach it to the given node.
void wxXml2Namespace::Destroy | ( | ) | [inline, protected, virtual] |
Destroys the data wrapped by this class freeing its memory.
This function should not try to update the reference count since it should have been already updated by the caller.
Implements wxXml2Wrapper.
xmlNs* wxXml2Namespace::GetObj | ( | ) | const [inline] |
Returns the associated XML structure.
wxString wxXml2Namespace::GetPrefix | ( | ) | const [inline] |
int& wxXml2Namespace::GetPrivate | ( | ) | const [inline, protected, virtual] |
Returns the private member of the wrapped structure.
This function should be used to implement copy constructor and assignment operators.
Implements wxXml2Wrapper.
wxString wxXml2Namespace::GetURI | ( | ) | const [inline] |
bool wxXml2Namespace::IsNonEmpty | ( | ) | const [inline, virtual] |
bool wxXml2Namespace::IsUnlinked | ( | ) | const [inline, virtual] |
Returns TRUE if this element is unlinked.
Since namespace structures does not contain a parent pointer by themselves, a wxXml2Namespace also keeps trace of the linked nodes using an additional variable m_owner.
Implements wxXml2Wrapper.
bool wxXml2Namespace::operator!= | ( | const wxXml2Namespace & | p | ) | const [inline] |
wxXml2Namespace& wxXml2Namespace::operator= | ( | const wxXml2Namespace & | n | ) | [inline] |
bool wxXml2Namespace::operator== | ( | const wxXml2Namespace & | ns | ) | const |
void wxXml2Namespace::SetAsEmpty | ( | ) | [inline, protected, virtual] |
Sets this element as empty: that is wrapping a NULL pointer.
This function *must not* free the memory of the currently wrapped pointer: it must just reset that pointer to NULL. This function is used by DestroyIfUnlinked().
Implements wxXml2Wrapper.
void wxXml2Namespace::SetPrefix | ( | const wxString & | p | ) |
void wxXml2Namespace::SetURI | ( | const wxString & | u | ) |