SDX::NodeContainer Class Reference

Anything that can contain nodes, for example a Document or a Node. More...

#include <SDXNodeContainer.h>

Inheritance diagram for SDX::NodeContainer:

SDX::Document SDX::Node

List of all members.

Public Member Functions

 NodeContainer ()
 Constructor.
virtual ~NodeContainer ()
 Destructor.
void setDeallocateContentOnDestruct (bool v)
 Set whether this NodeContainer should deallocate its children (and attributes if it's a Node) on destruct.
NodeContaineraddChild (Node *node)
 Add child node.
void removeChild (unsigned int index, bool deallocate=true)
 Remove child node.
void removeChild (Node *node, bool deallocate=true)
 Remove child node.
const std::vector< Node * > getChildren ()
 Get all child nodes.
const std::vector< Node * > getChildren (std::string nodeName)
 Get all child nodes named nodeName.
NodegetChild (std::string nodeName)
 Get last child named nodeNode.
NodegetChild (unsigned int index=0)
 Get child at index.
NodegetChild (std::string nodeName, std::string attributeValue, std::string attributeName="")
 Get child with name nodeName which has an attribute with value attributeValue named attributeName.

Protected Attributes

bool m_deallocateContentOnDestruct
 Whether to deallocate content on destruct.


Detailed Description

Anything that can contain nodes, for example a Document or a Node.

Definition at line 14 of file SDXNodeContainer.h.


Member Function Documentation

NodeContainer & NodeContainer::addChild ( Node node  ) 

Add child node.

Parameters:
node Node to add

Definition at line 23 of file SDXNodeContainer.cpp.

void NodeContainer::removeChild ( unsigned int  index,
bool  deallocate = true 
)

Remove child node.

If there's no child at index, this function does nothing.

Parameters:
index Index of child node.
deallocate Whether to dealloate the child node.

Definition at line 29 of file SDXNodeContainer.cpp.

void NodeContainer::setDeallocateContentOnDestruct ( bool  v  ) 

Set whether this NodeContainer should deallocate its children (and attributes if it's a Node) on destruct.

Parameters:
v Whether this NodeContainer should deallocate its content on destruct.

Definition at line 19 of file SDXNodeContainer.cpp.


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

Generated on Mon Apr 27 16:55:49 2009 for SDX by  doxygen 1.5.8