PWLib  1.10.10
Public Member Functions | Protected Attributes
PXMLElement Class Reference

#include <pxml.h>

Inheritance diagram for PXMLElement:
PXMLObject PObject

List of all members.

Public Member Functions

 PXMLElement (PXMLElement *_parent, const char *name=NULL)
 PXMLElement (PXMLElement *_parent, const PString &name, const PString &data)
BOOL IsElement () const
void PrintOn (ostream &strm) const
void Output (ostream &strm, const PXMLBase &xml, int indent) const
PCaselessString GetName () const
void SetName (const PString &v)
PINDEX GetSize () const
PXMLObjectAddSubObject (PXMLObject *elem, BOOL dirty=TRUE)
PXMLElementAddChild (PXMLElement *elem, BOOL dirty=TRUE)
PXMLDataAddChild (PXMLData *elem, BOOL dirty=TRUE)
void SetAttribute (const PCaselessString &key, const PString &value, BOOL setDirty=TRUE)
PString GetAttribute (const PCaselessString &key) const
PString GetKeyAttribute (PINDEX idx) const
PString GetDataAttribute (PINDEX idx) const
BOOL HasAttribute (const PCaselessString &key)
BOOL HasAttributes () const
PINDEX GetNumAttributes () const
PXMLElementGetElement (const PCaselessString &name, PINDEX idx=0) const
PXMLObjectGetElement (PINDEX idx=0) const
BOOL RemoveElement (PINDEX idx)
PINDEX FindObject (PXMLObject *ptr) const
BOOL HasSubObjects () const
PXMLObjectArray GetSubObjects () const
PString GetData () const
PXMLObjectClone (PXMLElement *parent) const

Protected Attributes

PCaselessString name
PStringToString attributes
PXMLObjectArray subObjects
BOOL dirty

Constructor & Destructor Documentation

PXMLElement::PXMLElement ( PXMLElement _parent,
const char *  name = NULL 
)
PXMLElement::PXMLElement ( PXMLElement _parent,
const PString name,
const PString data 
)

Member Function Documentation

PXMLElement* PXMLElement::AddChild ( PXMLElement elem,
BOOL  dirty = TRUE 
)
PXMLData* PXMLElement::AddChild ( PXMLData elem,
BOOL  dirty = TRUE 
)
PXMLObject* PXMLElement::AddSubObject ( PXMLObject elem,
BOOL  dirty = TRUE 
)
PXMLObject* PXMLElement::Clone ( PXMLElement parent) const [virtual]

Implements PXMLObject.

PINDEX PXMLElement::FindObject ( PXMLObject ptr) const
PString PXMLElement::GetDataAttribute ( PINDEX  idx) const
PXMLElement* PXMLElement::GetElement ( const PCaselessString name,
PINDEX  idx = 0 
) const
PXMLObject* PXMLElement::GetElement ( PINDEX  idx = 0) const
PString PXMLElement::GetKeyAttribute ( PINDEX  idx) const

References name.

PINDEX PXMLElement::GetNumAttributes ( ) const [inline]

References attributes.

PINDEX PXMLElement::GetSize ( ) const [inline]

References subObjects.

PXMLObjectArray PXMLElement::GetSubObjects ( ) const [inline]

References subObjects.

BOOL PXMLElement::HasAttributes ( ) const [inline]

References attributes.

BOOL PXMLElement::HasSubObjects ( ) const [inline]

References subObjects.

BOOL PXMLElement::IsElement ( ) const [inline, virtual]

Implements PXMLObject.

void PXMLElement::Output ( ostream &  strm,
const PXMLBase xml,
int  indent 
) const [virtual]

Implements PXMLObject.

void PXMLElement::PrintOn ( ostream &  strm) const [virtual]

Output the contents of the object to the stream. The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard operator<<# function.

The default behaviour is to print the class name.

Reimplemented from PObject.

BOOL PXMLElement::RemoveElement ( PINDEX  idx)
void PXMLElement::SetAttribute ( const PCaselessString key,
const PString value,
BOOL  setDirty = TRUE 
)
void PXMLElement::SetName ( const PString v) [inline]

Member Data Documentation

Referenced by GetNumAttributes(), and HasAttributes().

BOOL PXMLElement::dirty [protected]

Reimplemented from PXMLObject.

Referenced by GetName().

PXMLObjectArray PXMLElement::subObjects [protected]

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