cz::muni::stanse::codestructures::CFGNode Class Reference

Inheritance diagram for cz::muni::stanse::codestructures::CFGNode:
[legend]
Collaboration diagram for cz::muni::stanse::codestructures::CFGNode:
[legend]

List of all members.

Public Member Functions

 CFGNode ()
 CFGNode (Element e, String code)
 CFGNode (Element e)
int getNumber ()
String getCode ()
Element getElement ()
final int getColumn ()
final int getLine ()
List< CFGNodegetPredecessors ()
List< CFGNodegetSuccessors ()
List< CFGNodegetOptPredecessors ()
List< CFGNodegetOptSuccessors ()
void addEdge (CFGNode to)
void addOptEdge (CFGNode to)
void replaceEdge (CFGNode oldTo, CFGNode newTo)
void replaceOptEdge (CFGNode oldTo, CFGNode newTo)
void drop ()
boolean equals (Object obj)
int hashCode ()
String toString ()

Protected Member Functions

void addPred (CFGNode pred)
void addSucc (CFGNode succ)
void addSucc (int index, CFGNode succ)
void removeSucc (int index)
int indexOfSucc (CFGNode succ)
void addOptPred (CFGNode pred)
void addOptSucc (CFGNode succ)
void addOptSucc (int index, CFGNode succ)
void removeOptSucc (int index)
int indexOfOptSucc (CFGNode succ)


Detailed Description

Represents a node in control-flow graph (class ControlFlowGraph in this package)

Constructor & Destructor Documentation

cz::muni::stanse::codestructures::CFGNode::CFGNode (  )  [inline]

Creates a new instance of CFGNode

cz::muni::stanse::codestructures::CFGNode::CFGNode ( Element  e,
String  code 
) [inline]

Creates a new instance of CFGNode

Parameters:
e element to assign to this node

cz::muni::stanse::codestructures::CFGNode::CFGNode ( Element  e  )  [inline]

Creates a new instance of CFGNode

Parameters:
e element to assign to this node


Member Function Documentation

int cz::muni::stanse::codestructures::CFGNode::getNumber (  )  [inline]

Get unique node number

Returns:
unique node number

String cz::muni::stanse::codestructures::CFGNode::getCode (  )  [inline]

Get element corresponding to this node

Returns:
element

Element cz::muni::stanse::codestructures::CFGNode::getElement (  )  [inline]

Get element corresponding to this node

Returns:
element

final int cz::muni::stanse::codestructures::CFGNode::getColumn (  )  [inline]

final int cz::muni::stanse::codestructures::CFGNode::getLine (  )  [inline]

List<CFGNode> cz::muni::stanse::codestructures::CFGNode::getPredecessors (  )  [inline]

Get all predecessors of the node

Returns:
(read only) set of this node's predecessors

List<CFGNode> cz::muni::stanse::codestructures::CFGNode::getSuccessors (  )  [inline]

Get all successors of the node

Returns:
(read only) set of this node's successors

List<CFGNode> cz::muni::stanse::codestructures::CFGNode::getOptPredecessors (  )  [inline]

Get all predecessors of the node

Returns:
(read only) set of this node's predecessors

List<CFGNode> cz::muni::stanse::codestructures::CFGNode::getOptSuccessors (  )  [inline]

Get all successors of the node

Returns:
(read only) set of this node's successors

void cz::muni::stanse::codestructures::CFGNode::addPred ( CFGNode  pred  )  [inline, protected]

Adds the node to the predecessors

Parameters:
pred new predecessor

void cz::muni::stanse::codestructures::CFGNode::addSucc ( CFGNode  succ  )  [inline, protected]

Adds the node to the successors

Parameters:
succ new successor

void cz::muni::stanse::codestructures::CFGNode::addSucc ( int  index,
CFGNode  succ 
) [inline, protected]

Inserts the node to the successors at specified position

Parameters:
index index at which the specified element is to be inserted
succ new successor

void cz::muni::stanse::codestructures::CFGNode::removeSucc ( int  index  )  [inline, protected]

Removes the node from the successors

Parameters:
index the index of the element to be removed

int cz::muni::stanse::codestructures::CFGNode::indexOfSucc ( CFGNode  succ  )  [inline, protected]

Returns index of the specified successor

Parameters:
succ successor to get index for
Returns:
the index in the list

void cz::muni::stanse::codestructures::CFGNode::addOptPred ( CFGNode  pred  )  [inline, protected]

Adds the node to the predecessors

Parameters:
pred new predecessor

void cz::muni::stanse::codestructures::CFGNode::addOptSucc ( CFGNode  succ  )  [inline, protected]

Adds the node to the successors

Parameters:
succ new successor

void cz::muni::stanse::codestructures::CFGNode::addOptSucc ( int  index,
CFGNode  succ 
) [inline, protected]

Inserts the node to the successors at specified position

Parameters:
index index at which the specified element is to be inserted
succ new successor

void cz::muni::stanse::codestructures::CFGNode::removeOptSucc ( int  index  )  [inline, protected]

Removes the node from the successors

Parameters:
index the index of the element to be removed

int cz::muni::stanse::codestructures::CFGNode::indexOfOptSucc ( CFGNode  succ  )  [inline, protected]

Returns index of the specified successor

Parameters:
succ successor to get index for
Returns:
the index in the list

void cz::muni::stanse::codestructures::CFGNode::addEdge ( CFGNode  to  )  [inline]

Adds an edge between two nodes

Parameters:
to which node to add the edge to

Reimplemented in cz::muni::stanse::codestructures::CFGBranchNode, cz::muni::stanse::codestructures::CFGBreakNode, and cz::muni::stanse::codestructures::CFGJoinNode.

void cz::muni::stanse::codestructures::CFGNode::addOptEdge ( CFGNode  to  )  [inline]

Adds an optimized edge between two nodes (is in code, not in CFG)

Parameters:
to which node to add the edge to

Reimplemented in cz::muni::stanse::codestructures::CFGBranchNode, cz::muni::stanse::codestructures::CFGBreakNode, and cz::muni::stanse::codestructures::CFGJoinNode.

void cz::muni::stanse::codestructures::CFGNode::replaceEdge ( CFGNode  oldTo,
CFGNode  newTo 
) [inline]

Replaces an edge between two nodes with a new edge

Parameters:
oldTo which node to replace
newTo which node use as a replacement

void cz::muni::stanse::codestructures::CFGNode::replaceOptEdge ( CFGNode  oldTo,
CFGNode  newTo 
) [inline]

Replaces an edge between two nodes with a new edge

Parameters:
oldTo which node to replace
newTo which node use as a replacement

void cz::muni::stanse::codestructures::CFGNode::drop (  )  [inline]

boolean cz::muni::stanse::codestructures::CFGNode::equals ( Object  obj  )  [inline]

int cz::muni::stanse::codestructures::CFGNode::hashCode (  )  [inline]

String cz::muni::stanse::codestructures::CFGNode::toString (  )  [inline]


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

Generated on Thu Jan 13 16:24:08 2011 for Stanse by  doxygen 1.5.6