ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleDirectedGraphNode Class Reference

#include <SimpleDirectedGraph.h>

Inheritance diagram for SimpleDirectedGraphNode:

Public Member Functions

 ~SimpleDirectedGraphNode ()
 
std::set
< SimpleDirectedGraphNode * > 
getSuccessors ()
 get the nodes which are pointed to by the current node More...
 
std::set
< SimpleDirectedGraphNode * > 
getPredecessors ()
 get the nodes which point to the current node More...
 
void addSuccessor (SimpleDirectedGraphNode *n)
 add an edge from the current node to n More...
 
void addPredecessor (SimpleDirectedGraphNode *n)
 add an edge from n to the current node More...
 
bool hasSuccessor (SimpleDirectedGraphNode *n)
 test whether n is a successor of the current node More...
 
bool hasPredecessor (SimpleDirectedGraphNode *n)
 test whether n is a predecessor of the current node More...
 
int numSuccessors ()
 return the number of outgoing edges More...
 
int numPredecessors ()
 return the number of incoming edges More...
 
virtual void writeOut (std::ostream &os)
 virtual function to support displaying node information More...
 
virtual ~SimpleDirectedGraphNode ()
 
std::set
< SimpleDirectedGraphNode * > 
getSuccessors ()
 get the nodes which are pointed to by the current node More...
 
std::set
< SimpleDirectedGraphNode * > 
getPredecessors ()
 get the nodes which point to the current node More...
 
void addSuccessor (SimpleDirectedGraphNode *n)
 add an edge from the current node to n More...
 
void addPredecessor (SimpleDirectedGraphNode *n)
 add an edge from n to the current node More...
 
void removeSuccessor (SimpleDirectedGraphNode *n)
 
void removePredecessor (SimpleDirectedGraphNode *n)
 
bool hasSuccessor (SimpleDirectedGraphNode *n)
 test whether n is a successor of the current node More...
 
bool hasPredecessor (SimpleDirectedGraphNode *n)
 test whether n is a predecessor of the current node More...
 
int numSuccessors ()
 return the number of outgoing edges More...
 
int numPredecessors ()
 return the number of incoming edges More...
 
virtual void writeOut (std::ostream &os)
 virtual function to support displaying node information More...
 

Private Attributes

std::set
< SimpleDirectedGraphNode * > 
_succs
 the set of neighbors connected by outgoing edges More...
 
std::set
< SimpleDirectedGraphNode * > 
_preds
 the set of neighbors connected by incoming edges More...
 

Detailed Description

This is a node in the directed graph. All the connectivity information for the graph is captured in this (by way of the successor and predecessor sets).

This is a much simpler graph mechanism than that provided by util/graphs. It places most of the onus of edge bookkeeping on the nodes themselves.

Definition at line 27 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

Constructor & Destructor Documentation

SimpleDirectedGraphNode::~SimpleDirectedGraphNode ( )
inline
virtual SimpleDirectedGraphNode::~SimpleDirectedGraphNode ( )
inlinevirtual

Member Function Documentation

std::set<SimpleDirectedGraphNode *> SimpleDirectedGraphNode::getSuccessors ( )
inline

get the nodes which are pointed to by the current node

Definition at line 35 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _succs.

Referenced by SimpleDirectedGraph::getReachable(), and SimpleDirectedGraph::writeDot().

std::set<SimpleDirectedGraphNode *> SimpleDirectedGraphNode::getPredecessors ( )
inline

get the nodes which point to the current node

Definition at line 37 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _preds.

Referenced by SimpleDirectedGraph::getReachable().

void SimpleDirectedGraphNode::addSuccessor ( SimpleDirectedGraphNode n)
inline

add an edge from the current node to n

Definition at line 40 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _succs.

Referenced by SimpleDirectedGraph::addLink().

void SimpleDirectedGraphNode::addPredecessor ( SimpleDirectedGraphNode n)
inline

add an edge from n to the current node

Definition at line 42 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _preds.

Referenced by SimpleDirectedGraph::addLink().

bool SimpleDirectedGraphNode::hasSuccessor ( SimpleDirectedGraphNode n)
inline

test whether n is a successor of the current node

Definition at line 45 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _succs.

Referenced by SimpleDirectedGraph::linkExists().

bool SimpleDirectedGraphNode::hasPredecessor ( SimpleDirectedGraphNode n)
inline

test whether n is a predecessor of the current node

Definition at line 47 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _preds.

int SimpleDirectedGraphNode::numSuccessors ( )
inline

return the number of outgoing edges

Definition at line 50 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _succs.

int SimpleDirectedGraphNode::numPredecessors ( )
inline

return the number of incoming edges

Definition at line 52 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

References _preds.

virtual void SimpleDirectedGraphNode::writeOut ( std::ostream &  os)
inlinevirtual
std::set<SimpleDirectedGraphNode *> SimpleDirectedGraphNode::getSuccessors ( )
inline

get the nodes which are pointed to by the current node

Definition at line 36 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _succs.

std::set<SimpleDirectedGraphNode *> SimpleDirectedGraphNode::getPredecessors ( )
inline

get the nodes which point to the current node

Definition at line 38 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _preds.

void SimpleDirectedGraphNode::addSuccessor ( SimpleDirectedGraphNode n)
inline

add an edge from the current node to n

Definition at line 41 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _succs.

void SimpleDirectedGraphNode::addPredecessor ( SimpleDirectedGraphNode n)
inline

add an edge from n to the current node

Definition at line 43 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _preds.

void SimpleDirectedGraphNode::removeSuccessor ( SimpleDirectedGraphNode n)
inline
void SimpleDirectedGraphNode::removePredecessor ( SimpleDirectedGraphNode n)
inline
bool SimpleDirectedGraphNode::hasSuccessor ( SimpleDirectedGraphNode n)
inline

test whether n is a successor of the current node

Definition at line 49 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _succs.

bool SimpleDirectedGraphNode::hasPredecessor ( SimpleDirectedGraphNode n)
inline

test whether n is a predecessor of the current node

Definition at line 51 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _preds.

int SimpleDirectedGraphNode::numSuccessors ( )
inline

return the number of outgoing edges

Definition at line 54 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _succs.

int SimpleDirectedGraphNode::numPredecessors ( )
inline

return the number of incoming edges

Definition at line 56 of file staticInterproceduralSlicing/SimpleDirectedGraph.h.

References _preds.

virtual void SimpleDirectedGraphNode::writeOut ( std::ostream &  os)
inlinevirtual

Member Data Documentation

std::set< SimpleDirectedGraphNode * > SimpleDirectedGraphNode::_succs
private

the set of neighbors connected by outgoing edges

Definition at line 64 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

Referenced by addSuccessor(), getSuccessors(), hasSuccessor(), numSuccessors(), and removeSuccessor().

std::set< SimpleDirectedGraphNode * > SimpleDirectedGraphNode::_preds
private

the set of neighbors connected by incoming edges

Definition at line 66 of file dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h.

Referenced by addPredecessor(), getPredecessors(), hasPredecessor(), numPredecessors(), and removePredecessor().


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