Public Member Functions | Protected Member Functions

OA::NewExprTreeVisitor Class Reference

#include <NewExprTreeVisitor.hpp>

Inheritance diagram for OA::NewExprTreeVisitor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~NewExprTreeVisitor ()
virtual void visitExprTreeBefore (NewExprTree &)=0
 called before root noded in the expression tree is visited
virtual void visitExprTreeAfter (NewExprTree &)=0
 called after root noded in the expression tree is visited
virtual void visitNode (NewExprTree::Node &)=0
virtual void visitOpNode (NewExprTree::OpNode &n)
virtual void visitCallNode (NewExprTree::CallNode &n)
virtual void visitMemRefNode (NewExprTree::MemRefNode &n)
virtual void visitConstSymNode (NewExprTree::ConstSymNode &n)
virtual void visitConstValNode (NewExprTree::ConstValNode &n)

Protected Member Functions

 NewExprTreeVisitor ()

Detailed Description

ExprTreeVisitor is an abstract base class used to implement the Visitor pattern on ExprTree Nodes.

The ExprTree::acceptVisitor method will call visitExprTreeBefore, visitExprTreeAfter, and acceptVisitor on the root node. If you want to traverse other nodes then you must call acceptVisitor on children nodes when appropriate. See EvalToConstVisitor::visitOpNode for an example.

Memory Management: It is assumed that the concrete visitors will NOT keep references to expression tree nodes and that the expression tree will not be deallocated while an ExprTreeVisitor is visiting an ExprTree. Concrete visitors should also never take the address of a Node or ExprTree and pass it to a method that requires an OA_ptr<Node>.

Definition at line 39 of file NewExprTreeVisitor.hpp.


Constructor & Destructor Documentation

OA::NewExprTreeVisitor::NewExprTreeVisitor (  )  [inline, protected]

Definition at line 41 of file NewExprTreeVisitor.hpp.

virtual OA::NewExprTreeVisitor::~NewExprTreeVisitor (  )  [inline, virtual]

Definition at line 43 of file NewExprTreeVisitor.hpp.


Member Function Documentation

virtual void OA::NewExprTreeVisitor::visitCallNode ( NewExprTree::CallNode n  )  [inline, virtual]

Definition at line 60 of file NewExprTreeVisitor.hpp.

References visitNode().

Referenced by OA::NewExprTree::CallNode::operator<().

Here is the call graph for this function:

virtual void OA::NewExprTreeVisitor::visitConstSymNode ( NewExprTree::ConstSymNode n  )  [inline, virtual]

Definition at line 62 of file NewExprTreeVisitor.hpp.

References visitNode().

Referenced by OA::NewExprTree::ConstSymNode::operator<().

Here is the call graph for this function:

virtual void OA::NewExprTreeVisitor::visitConstValNode ( NewExprTree::ConstValNode n  )  [inline, virtual]

Definition at line 63 of file NewExprTreeVisitor.hpp.

References visitNode().

Referenced by OA::NewExprTree::ConstValNode::operator<().

Here is the call graph for this function:

virtual void OA::NewExprTreeVisitor::visitExprTreeAfter ( NewExprTree  )  [pure virtual]

called after root noded in the expression tree is visited

virtual void OA::NewExprTreeVisitor::visitExprTreeBefore ( NewExprTree  )  [pure virtual]

called before root noded in the expression tree is visited

virtual void OA::NewExprTreeVisitor::visitMemRefNode ( NewExprTree::MemRefNode n  )  [inline, virtual]

Definition at line 61 of file NewExprTreeVisitor.hpp.

References visitNode().

Referenced by OA::NewExprTree::MemRefNode::operator<().

Here is the call graph for this function:

virtual void OA::NewExprTreeVisitor::visitNode ( NewExprTree::Node  )  [pure virtual]
virtual void OA::NewExprTreeVisitor::visitOpNode ( NewExprTree::OpNode n  )  [inline, virtual]

Definition at line 59 of file NewExprTreeVisitor.hpp.

References visitNode().

Referenced by OA::NewExprTree::OpNode::operator<().

Here is the call graph for this function:


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