XML Library
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
XML::NodeContainer Class Reference

The mixin class used for node types that can contain other nodes. More...

#include <NodeContainer.hpp>

Inheritance diagram for XML::NodeContainer:
XML::Document XML::ElementNode

List of all members.

Public Types

typedef Nodes::const_iterator const_iterator
 The container const iterator.
typedef Nodes::iterator iterator
 The container iterator.

Public Member Functions

bool hasChildren () const
 Query if the node has any child nodes.
size_t getChildCount () const
 Get the count of child nodes.
const_iterator beginChild () const
 Get the start iterator for the child nodes.
const_iterator endChild () const
 Get the end iterator for the child nodes.
iterator beginChild ()
 Get the start iterator for the child nodes.
iterator endChild ()
 Get the end iterator for the child nodes.
void appendChild (NodePtr &pNode)
 Append a child node.
template<typename T >
void appendChild (Core::RefCntPtr< T > &pNode)
 Append a child node.

Protected Member Functions

 NodeContainer (Node *pParent)
 Constructor.
virtual ~NodeContainer ()
 Destructor.

Private Member Functions

 NodeContainer (const NodeContainer &)
NodeContaineroperator= (const NodeContainer)

Private Attributes

Nodem_pParent
 The outer parent node.
Nodes m_vChildNodes
 The collection of child nodes.

Detailed Description

The mixin class used for node types that can contain other nodes.

The outer parent node is held internally so that we can fix up the child nodes here automatically.


Member Typedef Documentation

typedef Nodes::const_iterator XML::NodeContainer::const_iterator

The container const iterator.

typedef Nodes::iterator XML::NodeContainer::iterator

The container iterator.


Constructor & Destructor Documentation

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

Constructor.

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

Destructor.


Member Function Documentation

bool XML::NodeContainer::hasChildren ( ) const [inline]

Query if the node has any child nodes.

size_t XML::NodeContainer::getChildCount ( ) const [inline]

Get the count of child nodes.

Get the start iterator for the child nodes.

Get the end iterator for the child nodes.

Get the start iterator for the child nodes.

Get the end iterator for the child nodes.

Append a child node.

template<typename T >
void XML::NodeContainer::appendChild ( Core::RefCntPtr< T > &  pNode) [inline]

Append a child node.

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

Member Data Documentation

The outer parent node.

The collection of child nodes.


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