artefaktur
software engineer &        architecture

 
 
 
 

class NodeIteratorWalker

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::xml::dom::NodeIteratorWalker Class Reference

#include <NodeIteratorWalker.h>

Inheritance diagram for acdk::xml::dom::NodeIteratorWalker:

acdk::lang::Object org::w3c::dom::traversal::TreeWalker org::w3c::dom::traversal::NodeIterator acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

API: org.w3c.dom<br>.

Author:
Roger Rene Kommer
Version:
Revision
1.2
Date:
Date
2005/02/05 10:45:36


Public Member Functions

 NodeIteratorWalker (IN(org::w3c::dom::RNode) rootNode, IN(org::w3c::dom::traversal::RNodeFilter) nodeFilter, int showFlags, bool expandEntity, bool walkMode)
org::w3c::dom::RNode getRoot ()
 The root node of the NodeIterator, as specified when it was created.

int getWhatToShow ()
 This attribute determines which node types are presented via the NodeIterator.

org::w3c::dom::traversal::RNodeFilter getFilter ()
 The NodeFilter used to screen nodes.

bool getExpandEntityReferences ()
 The value of this flag determines whether the children of entity reference nodes are visible to the NodeIterator.

org::w3c::dom::RNode nextNode () throw ( org::w3c::dom::RDOMException )
 Returns the next node in the set and advances the position of the NodeIterator in the set.

org::w3c::dom::RNode previousNode () throw ( org::w3c::dom::RDOMException )
 Returns the previous node in the set and moves the position of the NodeIterator backwards in the set.

org::w3c::dom::RNode getCurrentNode ()
 The node at which the TreeWalker is currently positioned.

void setCurrentNode (IN(org::w3c::dom::RNode) curNode) throw ( org::w3c::dom::RDOMException )
org::w3c::dom::RNode parentNode ()
 Moves to and returns the closest visible ancestor node of the current node.

org::w3c::dom::RNode firstChild ()
 Moves the TreeWalker to the first visible child of the current node, and returns the new node.

org::w3c::dom::RNode lastChild ()
 Moves the TreeWalker to the last visible child of the current node, and returns the new node.

org::w3c::dom::RNode previousSibling ()
 Moves the TreeWalker to the previous sibling of the current node, and returns the new node.

org::w3c::dom::RNode nextSibling ()
 Moves the TreeWalker to the next sibling of the current node, and returns the new node.

void detach ()
 Detaches the NodeIterator from the set which it iterated over, releasing any computational resources and placing the NodeIterator in the INVALID state.


Private Member Functions

bool _noSkip (IN(org::w3c::dom::RNode) node)

Private Attributes

org::w3c::dom::RNode _rootNode
org::w3c::dom::RNode _curNode
int _showFlags
org::w3c::dom::traversal::RNodeFilter _nodeFilter
bool _expandEntityReference
bool _walkMode

Constructor & Destructor Documentation

acdk::xml::dom::NodeIteratorWalker::NodeIteratorWalker IN(org::w3c::dom::RNode rootNode,
IN(org::w3c::dom::traversal::RNodeFilter nodeFilter,
int  showFlags,
bool  expandEntity,
bool  walkMode
 


Member Function Documentation

bool acdk::xml::dom::NodeIteratorWalker::_noSkip IN(org::w3c::dom::RNode node  )  [private]
 

void acdk::xml::dom::NodeIteratorWalker::detach  )  [inline, virtual]
 

Detaches the NodeIterator from the set which it iterated over, releasing any computational resources and placing the NodeIterator in the INVALID state.

After detach has been invoked, calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::firstChild  )  [virtual]
 

Moves the TreeWalker to the first visible child of the current node, and returns the new node.

If the current node has no visible children, returns null, and retains the current node.

Returns:
The new node, or null if the current node has no visible children in the TreeWalker's logical view.

Implements org::w3c::dom::traversal::TreeWalker.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::getCurrentNode  )  [inline, virtual]
 

The node at which the TreeWalker is currently positioned.


Alterations to the DOM tree may cause the current node to no longer be accepted by the TreeWalker's associated filter. currentNode may also be explicitly set to any node, whether or not it is within the subtree specified by the root node or would be accepted by the filter and whatToShow flags. Further traversal occurs relative to currentNode even if it is not part of the current view, by applying the filters in the requested direction; if no traversal is possible, currentNode is not changed.

Exceptions:
DOMException NOT_SUPPORTED_ERR: Raised if an attempt is made to set currentNode to null.

Implements org::w3c::dom::traversal::TreeWalker.

bool acdk::xml::dom::NodeIteratorWalker::getExpandEntityReferences  )  [inline, virtual]
 

The value of this flag determines whether the children of entity reference nodes are visible to the NodeIterator.

If false, these children and their descendants will be rejected. Note that this rejection takes precedence over whatToShow and the filter. Also note that this is currently the only situation where NodeIterators may reject a complete subtree rather than skipping individual nodes.

To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set expandEntityReferences to true when creating the NodeIterator. To produce a view of the document that has entity reference nodes but no entity expansion, use the whatToShow flags to show the entity reference node and set expandEntityReferences to false.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::traversal::RNodeFilter acdk::xml::dom::NodeIteratorWalker::getFilter  )  [inline, virtual]
 

The NodeFilter used to screen nodes.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::getRoot  )  [inline, virtual]
 

The root node of the NodeIterator, as specified when it was created.

Implements org::w3c::dom::traversal::NodeIterator.

int acdk::xml::dom::NodeIteratorWalker::getWhatToShow  )  [inline, virtual]
 

This attribute determines which node types are presented via the NodeIterator.

The available set of constants is defined in the NodeFilter interface. Nodes not accepted by whatToShow will be skipped, but their children may still be considered. Note that this skip takes precedence over the filter, if any.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::lastChild  )  [virtual]
 

Moves the TreeWalker to the last visible child of the current node, and returns the new node.

If the current node has no visible children, returns null, and retains the current node.

Returns:
The new node, or null if the current node has no children in the TreeWalker's logical view.

Implements org::w3c::dom::traversal::TreeWalker.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::nextNode  )  throw ( org::w3c::dom::RDOMException ) [virtual]
 

Returns the next node in the set and advances the position of the NodeIterator in the set.

After a NodeIterator is created, the first call to nextNode() returns the first node in the set.

Returns:
The next Node in the set being iterated over, or null if there are no more members in that set.
Exceptions:
DOMException INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::nextSibling  )  [virtual]
 

Moves the TreeWalker to the next sibling of the current node, and returns the new node.

If the current node has no visible next sibling, returns null, and retains the current node.

Returns:
The new node, or null if the current node has no next sibling. in the TreeWalker's logical view.

Implements org::w3c::dom::traversal::TreeWalker.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::parentNode  )  [virtual]
 

Moves to and returns the closest visible ancestor node of the current node.

If the search for parentNode attempts to step upward from the TreeWalker's root node, or if it fails to find a visible ancestor node, this method retains the current position and returns null.

Returns:
The new parent node, or null if the current node has no parent in the TreeWalker's logical view.

Implements org::w3c::dom::traversal::TreeWalker.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::previousNode  )  throw ( org::w3c::dom::RDOMException ) [virtual]
 

Returns the previous node in the set and moves the position of the NodeIterator backwards in the set.

Returns:
The previous Node in the set being iterated over, or null if there are no more members in that set.
Exceptions:
DOMException INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.

Implements org::w3c::dom::traversal::NodeIterator.

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::previousSibling  )  [virtual]
 

Moves the TreeWalker to the previous sibling of the current node, and returns the new node.

If the current node has no visible previous sibling, returns null, and retains the current node.

Returns:
The new node, or null if the current node has no previous sibling. in the TreeWalker's logical view.

Implements org::w3c::dom::traversal::TreeWalker.

void acdk::xml::dom::NodeIteratorWalker::setCurrentNode IN(org::w3c::dom::RNode curNode  )  throw ( org::w3c::dom::RDOMException )
 


Member Data Documentation

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::_curNode [private]
 

bool acdk::xml::dom::NodeIteratorWalker::_expandEntityReference [private]
 

org::w3c::dom::traversal::RNodeFilter acdk::xml::dom::NodeIteratorWalker::_nodeFilter [private]
 

org::w3c::dom::RNode acdk::xml::dom::NodeIteratorWalker::_rootNode [private]
 

int acdk::xml::dom::NodeIteratorWalker::_showFlags [private]
 

bool acdk::xml::dom::NodeIteratorWalker::_walkMode [private]
 

 
Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer