|
wxXml2
|
A generic XML node. More...
#include <xml2.h>


Public Member Functions | |
| wxXml2BaseNode () | |
| wxXml2BaseNode (wxXml2BaseNodeObj *p) | |
| virtual | ~wxXml2BaseNode () |
| bool | IsUnlinked () const |
| Is this node linked to a wider XML tree ? | |
| bool | IsNonEmpty () const |
| Returns TRUE if this object is wrapping a non-NULL object. | |
| bool | operator== (const wxXml2BaseNode &decl) const |
| bool | operator!= (const wxXml2BaseNode &decl) const |
| wxXml2BaseNode & | operator= (const wxXml2BaseNode &decl) |
Getters | |
These functions wrap on the fly the internal pointers of the libxml2 structure and then return them (this is why they return objects and not references to objects). | |
| wxXml2NodeType | GetType () const |
| wxXml2BaseNode | GetParent () const |
| wxXml2BaseNode | GetChildren () const |
| wxXml2BaseNode | GetFirstChild () const |
| wxXml2BaseNode | GetNext () const |
| wxXml2BaseNode | GetPrevious () const |
| wxXml2BaseNodeObj * | GetObj () const |
Setters: still not tested all & unstable. | |
These functions are dangereous since they can break the libxml2 internal tree if they are not used carefully. Try to avoid them. | |
| void | SetType (wxXml2NodeType type) |
| void | SetChildren (const wxXml2BaseNode &child) |
| void | SetNext (const wxXml2BaseNode &next) |
| void | SetPrevious (const wxXml2BaseNode &prev) |
Public Member Functions inherited from wxXml2Wrapper | |
| wxXml2Wrapper () | |
| Constructs this wrapper but not its wrapped data. | |
| virtual | ~wxXml2Wrapper () |
| The wxXml2Wrapper destructor will free the memory of the underlying libxml2 structure only if it is not linked to any XML tree. | |
| virtual void | DestroyIfUnlinked () |
| Destroys the wrapped data if it is unlinked. | |
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 wxXml2BaseNode &n) |
| int & | GetPrivate () const |
| Copies the given object. | |
Protected Member Functions inherited from wxXml2Wrapper | |
| void | ResetRefCount () |
| void | IncRefCount () |
| void | DecRefCount () |
| int | GetRefCount () const |
| void | UnwrappingOld () |
| This function should be called each time the internal pointer of the class is going to be replaced by another one. | |
| void | JustWrappedNew () |
| This function should be called each time the internal pointer of the class has been replaced by another one. | |
A generic XML node.
This is the base class for more specific nodes like wxXml2Node, wxXml2ElemDecl, wxXml2AttrDecl, wxXml2EntityDecl. This class provides the basic functions used to modify an XML tree. Libxml2 in fact, uses different structures for the different types of nodes but all of them have some parts in common: wxXml2BaseNodeObj is the common part of all XML nodes handled by libxml2. So, when you have an XML node, you can always cast it, regardless of its specific type, to a wxXml2BaseNodeObj and then change its NEXT, PREVIOUS, CHILDREN, PARENT pointers...
|
inline |
|
inline |
References wxXml2Wrapper::JustWrappedNew().
|
inlinevirtual |
|
inlineprotected |
References wxXml2Wrapper::JustWrappedNew(), and wxXml2Wrapper::UnwrappingOld().
Referenced by wxXml2ElemContent::operator=(), wxXml2Enumeration::operator=(), wxXml2ElemDecl::operator=(), wxXml2AttrDecl::operator=(), wxXml2EntityDecl::operator=(), wxXml2Node::operator=(), wxXml2AttrDecl::wxXml2AttrDecl(), wxXml2ElemDecl::wxXml2ElemDecl(), wxXml2EntityDecl::wxXml2EntityDecl(), wxXml2Enumeration::wxXml2Enumeration(), and wxXml2Node::wxXml2Node().
|
inlineprotectedvirtual |
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.
Reimplemented in wxXml2Node.
References wxXml2Wrapper::SetAsEmpty().
|
inline |
References wxXml2BaseNode, and wxXml2EmptyBaseNode.
Referenced by wxXml2Node::GetChildren().
|
inline |
Referenced by wxXml2Node::GetFirstChild().
|
inline |
References wxXml2BaseNode, and wxXml2EmptyBaseNode.
Referenced by wxXml2Node::GetNext().
|
inline |
Referenced by wxXml2ElemDecl::GetContent(), wxXml2EntityDecl::GetContent(), wxXml2Node::GetContent(), wxXml2AttrDecl::GetDefault(), wxXml2AttrDecl::GetDefaultVal(), wxXml2Node::GetDoc(), wxXml2AttrDecl::GetElementName(), wxXml2AttrDecl::GetEnum(), wxXml2EntityDecl::GetExternalID(), wxXml2AttrDecl::GetName(), wxXml2EntityDecl::GetName(), wxXml2Node::GetName(), wxXml2ElemDecl::GetNamespace(), wxXml2AttrDecl::GetNamespace(), wxXml2Node::GetNamespace(), wxXml2Node::GetNamespaceDecl(), wxXml2Node::GetNodeContent(), wxXml2Node::GetProperties(), wxXml2EntityDecl::GetSystemID(), wxXml2ElemDecl::GetType(), wxXml2AttrDecl::GetType(), wxXml2EntityDecl::GetType(), operator==(), SetChildren(), wxXml2Node::SetContent(), wxXml2Node::SetName(), SetNext(), wxXml2DTD::SetRoot(), and wxXml2Node::wxXml2Node().
|
inline |
References wxXml2BaseNode, and wxXml2EmptyBaseNode.
Referenced by wxXml2Node::GetParent().
|
inline |
References wxXml2BaseNode, and wxXml2EmptyBaseNode.
Referenced by wxXml2Node::GetPrevious().
|
inlineprotectedvirtual |
Copies the given object.
This function should be used to implement copy constructor and assignment operators. Returns the private member of the wrapped structure.
Implements wxXml2Wrapper.
|
inline |
Referenced by wxXml2Node::Build(), wxXml2Node::CmpNoNs(), and wxXml2DTD::GetRoot().
|
inlinevirtual |
Returns TRUE if this object is wrapping a non-NULL object.
Implements wxXml2Wrapper.
|
virtual |
Is this node linked to a wider XML tree ?
Implements wxXml2Wrapper.
References tagXml2BaseNode::next, tagXml2BaseNode::parent, and tagXml2BaseNode::prev.
|
inline |
|
inline |
| bool wxXml2BaseNode::operator== | ( | const wxXml2BaseNode & | decl | ) | const |
References GetObj(), and wxCHECK_NULL_POINTERS.
|
inlineprotectedvirtual |
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.
Referenced by wxXml2ElemContent::Destroy(), wxXml2Enumeration::Destroy(), and wxXml2Node::Destroy().
| void wxXml2BaseNode::SetChildren | ( | const wxXml2BaseNode & | child | ) |
References tagXml2BaseNode::children, GetObj(), and tagXml2BaseNode::parent.
| void wxXml2BaseNode::SetNext | ( | const wxXml2BaseNode & | next | ) |
References GetObj(), tagXml2BaseNode::next, and wxXml2EmptyBaseNode.
| void wxXml2BaseNode::SetPrevious | ( | const wxXml2BaseNode & | prev | ) |
|
inline |
References tagXml2BaseNode::type.
Referenced by wxXml2Document::SetStyleSheet().
1.8.2