OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OA::Tree::PreOrderIterator Class Reference

#include <Tree.hpp>

Inheritance diagram for OA::Tree::PreOrderIterator:
Inheritance graph
Collaboration diagram for OA::Tree::PreOrderIterator:
Collaboration graph

Public Member Functions

 PreOrderIterator (Tree &t)
 
virtual ~PreOrderIterator ()
 
void operator++ ()
 
void operator++ (int)
 
bool isValid () const
 
OA_ptr< Nodecurrent () const
 
- Public Member Functions inherited from OA::Iterator
 Iterator ()
 
virtual ~Iterator ()
 
void operator++ (int)
 

Private Attributes

OA_ptr< Nodep
 

Detailed Description

Pre-order iterator enumerates the nodes in pre-order (a node is visited before all its sub-trees).

Definition at line 396 of file Tree.hpp.

Constructor & Destructor Documentation

OA::Tree::PreOrderIterator::PreOrderIterator ( Tree t)

PreOrderIterator creates an iterator to enumerate the tree nodes in pre-order. If this is the first time a pre-order traversal has been demanded for this tree, or the tree has changed since the last pre-order traversal, a pre-order walk is carried out using the recursive method create_preorder_links. This links up the nodes in pre-order and subsequent pre-order traversals simply follow the links.

Definition at line 73 of file Tree.cpp.

References OA::Tree::create_preorder_links(), OA::n, OA::Tree::Node::next_preorder, OA::Tree::node_set, OA::Tree::preorder_needed, OA::OA_ptr< T >::ptrEqual(), and OA::Tree::root_node.

Here is the call graph for this function:

virtual OA::Tree::PreOrderIterator::~PreOrderIterator ( )
inlinevirtual

Member Function Documentation

OA_ptr<Node> OA::Tree::PreOrderIterator::current ( ) const
inline

Definition at line 403 of file Tree.hpp.

References p.

Referenced by DumpExprTree().

bool OA::Tree::PreOrderIterator::isValid ( ) const
inlinevirtual

Implements OA::Iterator.

Definition at line 402 of file Tree.hpp.

References p, and OA::OA_ptr< T >::ptrEqual().

Referenced by DumpExprTree().

Here is the call graph for this function:

void OA::Tree::PreOrderIterator::operator++ ( )
inlinevirtual

Implements OA::Iterator.

Definition at line 400 of file Tree.hpp.

References p, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

void OA::Tree::PreOrderIterator::operator++ ( int  )
inline

Definition at line 401 of file Tree.hpp.

Member Data Documentation

OA_ptr<Node> OA::Tree::PreOrderIterator::p
private

Definition at line 406 of file Tree.hpp.

Referenced by current(), isValid(), and operator++().


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