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)
 
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 ( )
inline

Constructor

virtual ~XmlParent ( )
inlinevirtual

Destructor

Member Function Documentation

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 XmlElement, XmlDocument, and XmlFragment.

Referenced by XmlParent::addChildSafe().

XmlChild* addChildSafe ( XmlChild child)
inline

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

Parameters
childThe child to append
Returns
The child on success, 0 on failure

References XmlParent::addChild(), and TelEngine::destruct().

virtual void clearChildren ( )
inlinevirtual

Clear this xml parent children. Default implementation does nothing

Reimplemented in XmlElement, and XmlFragment.

virtual XmlDocument* document ( )
inlinevirtual

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

Returns
0

Reimplemented in XmlDocument.

Referenced by XmlDomParser::document().

virtual XmlElement* element ( )
inlinevirtual

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

Returns
0

Reimplemented in XmlElement.

Referenced by XmlElement::parent().

virtual XmlFragment* fragment ( )
inlinevirtual

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

Returns
0

Reimplemented in XmlFragment.

Referenced by XmlDomParser::fragment().

virtual const ObjList& getChildren ( ) const
inlinevirtual

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

Returns
The list of children

Reimplemented in XmlElement, and XmlFragment.

References ObjList::empty().

Referenced by XmlParent::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().

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 XmlElement, XmlDocument, and XmlFragment.

virtual void reset ( )
inlinevirtual

Reset this xml parent. Default implementation does nothing

Reimplemented in XmlDocument, and XmlFragment.


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