Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XSECXPathNodeList Class Reference
[Internal Classes]

#include <XSECXPathNodeList.hpp>

List of all members.


Detailed Description

Class for holding lists of DOMNodes.

This class is used primarily for holding lists of nodes found during XPath processing. It is also used for xpath-filter which requires multiple list comparisons.

It is not implemented using one of the container classes as it has the potential to become a real bottleneck. It could potentially be implemented as a hash list based on names of nodes (or even pointers).


Public Member Functions

Constructors, Destructors and operators
 XSECXPathNodeList (unsigned int initialSize=_XSEC_NODELIST_DEFAULT_SIZE)
 XSECXPathNodeList (const XSECXPathNodeList &other)
 Copy Constructor.
 ~XSECXPathNodeList ()
XSECXPathNodeListoperator= (const XSECXPathNodeList &toCopy)
 Assignment Operator.
Adding and Deleting nodes
void addNode (const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *n)
 Add a node to the list.
void removeNode (const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *n)
 Remove a node from the list.
void clear (void)
 Clear out the entire list, deleting all entries.
Reading List Functions
bool hasNode (const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *n)
 Check if a node exists in the list.
const XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode * 
getFirstNode (void)
 Get the first node in the list.
const XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode * 
getNextNode (void)
 Get the next node in the list.
Manipulating Nodesets
void intersect (const XSECXPathNodeList &toIntersect)
 Intersect with nodeset.


Constructor & Destructor Documentation

XSECXPathNodeList::XSECXPathNodeList unsigned int  initialSize = _XSEC_NODELIST_DEFAULT_SIZE  ) 
 

XSECXPathNodeList::XSECXPathNodeList const XSECXPathNodeList other  ) 
 

Copy Constructor.

Note:
The XSEC Library generally passes NodeLists around as pointers. There is a LARGE overhead associated with re-creating lists, so we try to avoid doing it unless necessary.

XSECXPathNodeList::~XSECXPathNodeList  ) 
 


Member Function Documentation

void XSECXPathNodeList::addNode const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  n  ) 
 

Add a node to the list.

Checks to see whether the node is already in the list, and if not adds it.

Parameters:
n The node to add.

void XSECXPathNodeList::clear void   ) 
 

Clear out the entire list, deleting all entries.

const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* XSECXPathNodeList::getFirstNode void   ) 
 

Get the first node in the list.

Returns the first node in the list of nodes and resets the search list.

Returns:
The first node in the list or NULL if none exist

const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* XSECXPathNodeList::getNextNode void   ) 
 

Get the next node in the list.

Returns the next node in the list.

Returns:
The next node in the list of NULL if none exist

bool XSECXPathNodeList::hasNode const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  n  ) 
 

Check if a node exists in the list.

Parameters:
n The node to find in the list.

void XSECXPathNodeList::intersect const XSECXPathNodeList toIntersect  ) 
 

Intersect with nodeset.

Delete any nodes in my list that are not in the intersect list

Parameters:
toIntersect The list to intersect with.

XSECXPathNodeList& XSECXPathNodeList::operator= const XSECXPathNodeList toCopy  ) 
 

Assignment Operator.

Set one node list equal to another.

Note:
Do not do this frequently, particularly for large lists as it will replicate the entire list and is a fairly expensive operation
Parameters:
toCopy The list to be copied from

void XSECXPathNodeList::removeNode const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  n  ) 
 

Remove a node from the list.

Given a node, find it in the list and (if it exists) delete it from the list.

Parameters:
n The node to be removed.


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:46:09 2005 for XML-Security-C by  doxygen 1.4.2