OA::ExprTree Class Reference

#include <CompareExprTree.hpp>

Inheritance diagram for OA::ExprTree:
Inheritance graph
[legend]
Collaboration diagram for OA::ExprTree:
Collaboration graph
[legend]

List of all members.

Classes

class  CallNode
class  ChildNodesIterator
class  ConstSymNode
class  ConstValNode
class  Edge
class  EdgesIterator
class  MemRefNode
class  Node
class  NodesIterator
class  OpNode
class  OutEdgesIterator
class  PostOrderIterator
class  PreOrderIterator
class  ReversePostOrderIterator

Public Member Functions

 ExprTree ()
virtual ~ExprTree ()
OA_ptr< NodegetRoot ()
void acceptVisitor (ExprTreeVisitor &pVisitor)
 visit root and then accept visitor on tree
void connect (OA_ptr< Node > src, OA_ptr< Node > dst)
void disconnect (OA_ptr< Edge > e)
void copyAndConnectSubTree (OA_ptr< Node > src, OA_ptr< ExprTree > subtree)
bool operator< (ExprTree &other)
 an ordering for expression trees, needed for use within STL containers
bool operator== (ExprTree &other)
virtual int getOrder ()
void str (std::ostream &os)
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
void output (IRHandlesIRInterface &ir)
 ExprTree ()
virtual ~ExprTree ()
OA_ptr< NodegetRoot ()
void acceptVisitor (ExprTreeVisitor &pVisitor)
 visit root and then accept visitor on tree
void connect (OA_ptr< Node > src, OA_ptr< Node > dst)
void disconnect (OA_ptr< Edge > e)
void copyAndConnectSubTree (OA_ptr< Node > src, OA_ptr< ExprTree > subtree)
bool operator< (ExprTree &other)
 an ordering for expression trees, needed for use within STL containers
bool operator== (ExprTree &other)
virtual int getOrder ()
void str (std::ostream &os)
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
void output (IRHandlesIRInterface &ir)

Static Private Attributes

static const int sOrder = -200

Detailed Description

ExprTree is a Tree with enhanced nodes. It represents expressions involving various IRHandles.

Definition at line 55 of file CompareExprTree.hpp.


Constructor & Destructor Documentation

OA::ExprTree::ExprTree (  ) 

Definition at line 25 of file CompareExprTree.cpp.

OA::ExprTree::~ExprTree (  )  [virtual]

Definition at line 29 of file CompareExprTree.cpp.

OA::ExprTree::ExprTree (  ) 
virtual OA::ExprTree::~ExprTree (  )  [virtual]

Member Function Documentation

void OA::ExprTree::acceptVisitor ( ExprTreeVisitor pVisitor  ) 

visit root and then accept visitor on tree

void OA::ExprTree::acceptVisitor ( ExprTreeVisitor pVisitor  ) 

visit root and then accept visitor on tree

visit nodes in require order and then accept visitor on tree

Definition at line 77 of file CompareExprTree.cpp.

References getRoot(), OA::ExprTreeVisitor::visitExprTreeAfter(), and OA::ExprTreeVisitor::visitExprTreeBefore().

Referenced by output().

Here is the call graph for this function:

void OA::ExprTree::connect ( OA_ptr< Node src,
OA_ptr< Node dst 
) [inline]

Reimplemented in OA::NewExprTree.

Definition at line 78 of file ExprTree.hpp.

References OA::Tree::addEdge().

Here is the call graph for this function:

void OA::ExprTree::connect ( OA_ptr< Node src,
OA_ptr< Node dst 
) [inline]

Reimplemented in OA::NewExprTree.

Definition at line 78 of file CompareExprTree.hpp.

References OA::Tree::addEdge().

Referenced by copyAndConnectSubTree().

Here is the call graph for this function:

void OA::ExprTree::copyAndConnectSubTree ( OA_ptr< Node src,
OA_ptr< ExprTree subtree 
)

Reimplemented in OA::NewExprTree.

void OA::ExprTree::copyAndConnectSubTree ( OA_ptr< Node src,
OA_ptr< ExprTree subtree 
)

Copies the given subtree into this tree as a child of the given node

Reimplemented in OA::NewExprTree.

Definition at line 90 of file ExprTree.cpp.

References connect(), OA::ExprTree::EdgesIterator::current(), OA::ExprTree::NodesIterator::current(), OA::Tree::EdgesIterator::isValid(), and OA::Tree::NodesIterator::isValid().

Here is the call graph for this function:

void OA::ExprTree::disconnect ( OA_ptr< Edge e  )  [inline]

Reimplemented in OA::NewExprTree.

Definition at line 80 of file ExprTree.hpp.

References OA::OA_ptr< T >::convert(), and OA::Tree::removeEdge().

Here is the call graph for this function:

void OA::ExprTree::disconnect ( OA_ptr< Edge e  )  [inline]

Reimplemented in OA::NewExprTree.

Definition at line 80 of file CompareExprTree.hpp.

References OA::OA_ptr< T >::convert(), and OA::Tree::removeEdge().

Here is the call graph for this function:

void OA::ExprTree::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)

Reimplemented in OA::NewExprTree.

void OA::ExprTree::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)

Copies the given subtree into this tree as a child of the given node

Reimplemented in OA::NewExprTree.

Definition at line 112 of file CompareExprTree.cpp.

References OA::ExprTree::NodesIterator::current(), OA::OA_ptr< T >::dump(), and OA::Tree::NodesIterator::isValid().

Here is the call graph for this function:

virtual int OA::ExprTree::getOrder (  )  [inline, virtual]

Definition at line 90 of file ExprTree.hpp.

References sOrder.

virtual int OA::ExprTree::getOrder (  )  [inline, virtual]

Definition at line 90 of file CompareExprTree.hpp.

References sOrder.

OA_ptr<Node> OA::ExprTree::getRoot (  )  [inline]

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

Definition at line 66 of file ExprTree.hpp.

References OA::OA_ptr< T >::convert(), getRoot(), and OA::n.

Here is the call graph for this function:

OA_ptr<Node> OA::ExprTree::getRoot (  )  [inline]

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

Definition at line 66 of file CompareExprTree.hpp.

References OA::OA_ptr< T >::convert(), and OA::n.

Referenced by acceptVisitor(), and getRoot().

Here is the call graph for this function:

bool OA::ExprTree::operator< ( ExprTree other  ) 

an ordering for expression trees, needed for use within STL containers

Reimplemented in OA::NewExprTree.

bool OA::ExprTree::operator< ( ExprTree other  ) 

an ordering for expression trees, needed for use within STL containers

Reimplemented in OA::NewExprTree.

Definition at line 127 of file CompareExprTree.cpp.

bool OA::ExprTree::operator== ( ExprTree other  ) 

check if two memory references are equal at the level of accuracy provided by the MemRefExpr approximation

Reimplemented in OA::NewExprTree.

bool OA::ExprTree::operator== ( ExprTree other  ) 

check if two memory references are equal at the level of accuracy provided by the MemRefExpr approximation

Reimplemented in OA::NewExprTree.

Definition at line 137 of file CompareExprTree.cpp.

void OA::ExprTree::output ( IRHandlesIRInterface ir  )  [virtual]

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

void OA::ExprTree::output ( IRHandlesIRInterface ir  )  [virtual]

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

Definition at line 143 of file CompareExprTree.cpp.

References acceptVisitor(), and OA::Annotation::sOutBuild.

Here is the call graph for this function:

void OA::ExprTree::str ( std::ostream &  os  ) 

Reimplemented in OA::NewExprTree.

void OA::ExprTree::str ( std::ostream &  os  ) 

Reimplemented in OA::NewExprTree.


Member Data Documentation

static const int OA::ExprTree::sOrder = -200 [static, private]

Definition at line 60 of file CompareExprTree.hpp.

Referenced by getOrder().


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

Generated on Sat Oct 31 05:25:13 2009 for OpenAnalysis by  doxygen 1.6.1