wxXml2
Public Member Functions | List of all members
wxXml2ElemDecl Class Reference

An element declaration. More...

#include <dtd.h>

Inheritance diagram for wxXml2ElemDecl:
Inheritance graph
[legend]
Collaboration diagram for wxXml2ElemDecl:
Collaboration graph
[legend]

Public Member Functions

 wxXml2ElemDecl ()
 
 wxXml2ElemDecl (xmlElement *n)
 Wraps the given libxml2 structure.
 
 wxXml2ElemDecl (const wxXml2ElemDecl &n)
 Copies the given wrapper (does not imply the XML structure copy).
 
 wxXml2ElemDecl (const wxXml2DTD &parent, const wxString &name, wxXml2ElementTypeVal val=wxXML2_ELEMENT_TYPE_ELEMENT, wxXml2ElemContent &content=wxXml2EmptyElemContent)
 Creates a new element declaration and automatically link it to the given parent.
 
virtual ~wxXml2ElemDecl ()
 
bool operator== (const wxXml2ElemDecl &decl) const
 
bool operator!= (const wxXml2ElemDecl &decl) const
 
wxXml2ElemDecloperator= (const wxXml2ElemDecl &decl)
 
void Create (const wxXml2DTD &parent, const wxString &name, wxXml2ElementTypeVal val, wxXml2ElemContent &content)
 
xmlElement * GetObj () const
 
wxXml2DTD GetParent () const
 
wxXml2AttrDecl GetAttributes () const
 
wxXml2ElementTypeVal GetType () const
 
wxXml2ElemContent GetContent () const
 
wxXml2Namespace GetNamespace () const
 
- Public Member Functions inherited from wxXml2BaseNode
 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
 
wxXml2BaseNodeoperator= (const wxXml2BaseNode &decl)
 
wxXml2NodeType GetType () const
 
wxXml2BaseNode GetParent () const
 
wxXml2BaseNode GetChildren () const
 
wxXml2BaseNode GetFirstChild () const
 
wxXml2BaseNode GetNext () const
 
wxXml2BaseNode GetPrevious () const
 
wxXml2BaseNodeObjGetObj () const
 
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.
 

Additional Inherited Members

- Protected Member Functions inherited from wxXml2BaseNode
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.
 

Detailed Description

An element declaration.

This type of node is used only inside an inlined/external DTD. Looks like:

<!ELEMENT name .... >

^— wxXml2ElemContent

wxXml2ElemDecl handles also the cases:

<!ELEMENT name ANY> <!ELEMENT name EMPTY>

setting the appropriate wxXml2ElementTypeVal value.

Constructor & Destructor Documentation

wxXml2ElemDecl::wxXml2ElemDecl ( )
inline
wxXml2ElemDecl::wxXml2ElemDecl ( xmlElement *  n)
inline

Wraps the given libxml2 structure.

References wxXml2Wrapper::JustWrappedNew().

wxXml2ElemDecl::wxXml2ElemDecl ( const wxXml2ElemDecl n)
inline

Copies the given wrapper (does not imply the XML structure copy).

References wxXml2BaseNode::Copy().

wxXml2ElemDecl::wxXml2ElemDecl ( const wxXml2DTD parent,
const wxString &  name,
wxXml2ElementTypeVal  val = wxXML2_ELEMENT_TYPE_ELEMENT,
wxXml2ElemContent content = wxXml2EmptyElemContent 
)
inline

Creates a new element declaration and automatically link it to the given parent.

virtual wxXml2ElemDecl::~wxXml2ElemDecl ( )
inlinevirtual

Member Function Documentation

void wxXml2ElemDecl::Create ( const wxXml2DTD parent,
const wxString &  name,
wxXml2ElementTypeVal  val,
wxXml2ElemContent content 
)
wxXml2AttrDecl wxXml2ElemDecl::GetAttributes ( ) const
wxXml2ElemContent wxXml2ElemDecl::GetContent ( ) const
inline
wxXml2Namespace wxXml2ElemDecl::GetNamespace ( ) const
inline
xmlElement* wxXml2ElemDecl::GetObj ( ) const
inline
wxXml2DTD wxXml2ElemDecl::GetParent ( ) const

References GetObj(), wxXml2DTD, and wxXml2EmptyDTD.

wxXml2ElementTypeVal wxXml2ElemDecl::GetType ( ) const
inline
bool wxXml2ElemDecl::operator!= ( const wxXml2ElemDecl decl) const
inline
wxXml2ElemDecl& wxXml2ElemDecl::operator= ( const wxXml2ElemDecl decl)
inline
bool wxXml2ElemDecl::operator== ( const wxXml2ElemDecl decl) const

The documentation for this class was generated from the following files: