XML Library
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
XML::Node Class Reference

The base class for all nodes that are stored in an XML document. More...

#include <Node.hpp>

Inheritance diagram for XML::Node:
XML::CDataNode XML::CommentNode XML::DocTypeNode XML::Document XML::ElementNode XML::ProcessingNode XML::TextNode

List of all members.

Public Member Functions

virtual NodeType type () const =0
 Get the real type of the node.
const tchar * typeStr () const
 Get the type of the node as a string.
bool hasParent () const
 Get if the node has a parent.
const NodePtr parent () const
 Get the parent node.
NodePtr parent ()
 Get the parent node.

Static Public Member Functions

static const tchar * formatNodeType (NodeType eType)
 Convert the node type to a string.

Protected Member Functions

 Node ()
 Default constructor.
virtual ~Node ()
 Destructor.
void setParent (Node *pParent)
 Set the parent node.

Private Member Functions

 Node (const Node &)
Nodeoperator= (const Node &)

Private Attributes

Nodem_pParent
 The parent node.

Friends

class NodeContainer
 Allow container class to set the parent.

Detailed Description

The base class for all nodes that are stored in an XML document.

The node types use internal reference counting to make it more efficient and easier to deal with the back pointers. We store the parent node as a raw pointer to ensure we don't have any cyclic references.


Constructor & Destructor Documentation

XML::Node::Node ( ) [protected]

Default constructor.

XML::Node::~Node ( ) [protected, virtual]

Destructor.

XML::Node::Node ( const Node ) [private]

Member Function Documentation

virtual NodeType XML::Node::type ( ) const [pure virtual]
const tchar * XML::Node::typeStr ( ) const [inline]

Get the type of the node as a string.

bool XML::Node::hasParent ( ) const [inline]

Get if the node has a parent.

const NodePtr XML::Node::parent ( ) const [inline]

Get the parent node.

NodePtr XML::Node::parent ( ) [inline]

Get the parent node.

const tchar * XML::Node::formatNodeType ( NodeType  eType) [static]

Convert the node type to a string.

void XML::Node::setParent ( Node pParent) [inline, protected]

Set the parent node.

Node& XML::Node::operator= ( const Node ) [private]

Friends And Related Function Documentation

friend class NodeContainer [friend]

Allow container class to set the parent.


Member Data Documentation

The parent node.


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