Yate
Public Member Functions | List of all members
XmlParent Class Referenceabstract

Xml Parent. More...

#include <yatexml.h>

Inheritance diagram for XmlParent:
XmlDocument XmlElement XmlFragment

Public Member Functions

 XmlParent ()
 
virtual ~XmlParent ()
 
virtual XmlDocumentdocument ()
 
virtual XmlFragmentfragment ()
 
virtual XmlElementelement ()
 
virtual XmlSaxParser::Error addChild (XmlChild *child)=0
 
XmlChildaddChildSafe (XmlChild *child, XmlSaxParser::Error *code=0)
 
virtual XmlChildremoveChild (XmlChild *child, bool delObj=true)=0
 
virtual void reset ()
 
virtual const ObjListgetChildren () const
 
virtual void clearChildren ()
 
bool hasChildren () const
 

Detailed Description

Xml Parent.

Xml Parent for a Xml child

Constructor & Destructor Documentation

◆ XmlParent()

XmlParent ( )
inline

Constructor

◆ ~XmlParent()

virtual ~XmlParent ( )
inlinevirtual

Destructor

Member Function Documentation

◆ addChild()

virtual XmlSaxParser::Error addChild ( XmlChild child)
pure virtual

Append a new child to this XmlParent

Parameters
childThe child to append
Returns
NoError if the child was successfully added

Implemented in XmlFragment, XmlDocument, and XmlElement.

Referenced by XmlParent::addChildSafe().

◆ addChildSafe()

XmlChild * addChildSafe ( XmlChild child,
XmlSaxParser::Error *  code = 0 
)
inline

Append a new child of this XmlParent, release the object on failure

Parameters
childThe child to append
codeOptional pointr to error code to be filled on failure
Returns
The child on success, 0 on failure

References XmlParent::addChild().

◆ clearChildren()

virtual void clearChildren ( )
inlinevirtual

Clear this xml parent children. Default implementation does nothing

Reimplemented in XmlFragment, and XmlElement.

◆ document()

virtual XmlDocument * document ( )
inlinevirtual

Get an XmlDocument object from this XmlParent. Default implementation return 0

Returns
0

Reimplemented in XmlDocument.

Referenced by XmlDomParser::document().

◆ element()

virtual XmlElement * element ( )
inlinevirtual

Get an XmlElement object from this XmlParent. Default implementation return 0

Returns
0

Reimplemented in XmlElement.

Referenced by XmlElement::parent().

◆ fragment()

virtual XmlFragment * fragment ( )
inlinevirtual

Get an XmlFragment object from this XmlParent. Default implementation return 0

Returns
0

Reimplemented in XmlFragment.

Referenced by XmlDomParser::fragment().

◆ getChildren()

virtual const ObjList & getChildren ( ) const
inlinevirtual

Obtain this xml parent children. Default implementation returns an empty list

Returns
The list of children

Reimplemented in XmlFragment, and XmlElement.

References ObjList::empty().

Referenced by XmlParent::hasChildren().

◆ hasChildren()

bool hasChildren ( ) const
inline

Check if at least one child element exists

Returns
True if this parent has at least one child

References XmlParent::getChildren(), and ObjList::skipNull().

◆ removeChild()

virtual XmlChild * removeChild ( XmlChild child,
bool  delObj = true 
)
pure virtual

Remove a child

Parameters
childThe child to remove
delObjTrue to delete the object
Returns
XmlChild pointer if found and not deleted

Implemented in XmlFragment, XmlDocument, and XmlElement.

◆ reset()

virtual void reset ( )
inlinevirtual

Reset this xml parent. Default implementation does nothing

Reimplemented in XmlFragment, and XmlDocument.


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