Classes | Public Member Functions | Static Private Attributes

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 20 of file CompareExprTree.cpp.

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

Definition at line 24 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

visit nodes in require order and then accept visitor on tree

Definition at line 72 of file CompareExprTree.cpp.

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

Here is the call graph for this function:

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

visit root and then accept visitor on tree

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.

Referenced by copyAndConnectSubTree().

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.

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

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::copyAndConnectSubTree ( OA_ptr< Node src,
OA_ptr< ExprTree subtree 
)
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().

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

Here is the call graph for this function:

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 107 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:

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

Reimplemented in OA::NewExprTree.

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

Definition at line 90 of file CompareExprTree.hpp.

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

Definition at line 90 of file ExprTree.hpp.

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(), OA::Tree::getRoot(), and OA::n.

Referenced by acceptVisitor().

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 ExprTree.hpp.

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

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

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

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

Definition at line 122 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

Definition at line 132 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

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

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

Definition at line 138 of file CompareExprTree.cpp.

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

Reimplemented from OA::Tree.

Reimplemented in OA::NewExprTree.

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.


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