Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

XSECXPathNodeList Class Reference

Class for holding lists of DOMNodes. More...

#include <XSECXPathNodeList.hpp>

Collaboration diagram for XSECXPathNodeList:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors, Destructors and operators
 XSECXPathNodeList ()
 XSECXPathNodeList (const XSECXPathNodeList &other)
 Copy Constructor. More...

 ~XSECXPathNodeList ()
XSECXPathNodeList & operator= (const XSECXPathNodeList &toCopy)
 Assignment Operator. More...

Adding and Deleting nodes
void addNode (const DOMNode *n)
 Add a node to the list. More...

void removeNode (const DOMNode *n)
 Remove a node from the list. More...

void clear (void)
 Clear out the entire list, deleting all entries. More...

Reading List Functions
bool hasNode (const DOMNode *n)
 Check if a node exists in the list. More...

const DOMNode * getFirstNode (void)
 Get the first node in the list. More...

const DOMNode * getNextNode (void)
 Get the next node in the list. More...


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).


Constructor & Destructor Documentation

XSECXPathNodeList::XSECXPathNodeList (    ) 
 

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 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 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 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 DOMNode *    n ) 
 

Check if a node exists in the list.

Parameters:
n  The node to find in the list.

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 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 Sat Jan 11 20:35:32 2003 for XML-Security-C by doxygen1.2.15