Otawa  0.10
otawa::GenGraph< N, E > Class Template Reference

#include <otawa/graph/GenGraph.h>

Inheritance diagram for otawa::GenGraph< N, E >:
otawa::graph::Graph otawa::pfg::PFG

Classes

class  GenEdge
 
class  GenNode
 
class  InIterator
 
class  Iterator
 
class  OutIterator
 

Public Types

typedef N * Vertex
 
typedef E * Edge
 

Public Member Functions

int count (void) const
 
bool contains (N *item) const
 
bool isEmpty (void) const
 
 operator bool (void) const
 
void clear (void)
 
void add (GenNode *node)
 
template<template< class _ > class C>
void addAll (const C< N * > &items)
 
void remove (GenNode *node)
 
template<template< class _ > class C>
void removeAll (const C< N * > &items)
 
void remove (GenEdge *edge)
 
N * sinkOf (E *edge) const
 
int outDegree (N *vertex) const
 
bool isSuccessorOf (N *succ, N *ref) const
 
N * sourceOf (E *edge) const
 
int inDegree (N *vertex) const
 
bool isPredecessorOf (N *succ, N *ref) const
 
int indexOf (N *vertex) const
 
const graph::Graph_ (void) const
 
graph::Graph_ (void)
 

Static Public Member Functions

static const graph::Node_ (const GenNode *node)
 
static const graph::Edge_ (const GenEdge *edge)
 
static graph::Node_ (GenNode *node)
 
static graph::Edge_ (Edge *edge)
 

Private Member Functions

void remove (graph::Edge *edge)
 Destroy an edge. More...
 
void remove (Node *node)
 Remove a node from a graph. More...
 
void remove (const Iterator &iter)
 
bool contains (Node *item) const
 
void add (Node *node)
 Add new node. More...
 
template<template< class _ > class C>
void addAll (const C< Node * > &items)
 
template<template< class _ > class C>
void removeAll (const C< Node * > &items)
 
NodesinkOf (graph::Edge *edge) const
 
int outDegree (Node *vertex) const
 Get the out degree of the given vertex. More...
 
bool isSuccessorOf (Node *succ, Node *ref) const
 Test if the vertex succ is successor of the vertex ref. More...
 
NodesourceOf (graph::Edge *edge) const
 
int inDegree (Node *vertex) const
 Get the in degree of the given vertex. More...
 
bool isPredecessorOf (Node *prev, Node *ref) const
 Test if the vertex pred is predecessor of the vertex ref. More...
 
int indexOf (Node *vertex) const
 

Member Typedef Documentation

template<class N, class E>
typedef E* otawa::GenGraph< N, E >::Edge
template<class N, class E>
typedef N* otawa::GenGraph< N, E >::Vertex

Member Function Documentation

template<class N, class E>
static const graph::Node* otawa::GenGraph< N, E >::_ ( const GenNode node)
inlinestatic
template<class N, class E>
static const graph::Edge* otawa::GenGraph< N, E >::_ ( const GenEdge edge)
inlinestatic
template<class N, class E>
const graph::Graph* otawa::GenGraph< N, E >::_ ( void  ) const
inline
template<class N, class E>
static graph::Node* otawa::GenGraph< N, E >::_ ( GenNode node)
inlinestatic
template<class N, class E>
static graph::Edge* otawa::GenGraph< N, E >::_ ( Edge edge)
inlinestatic
template<class N, class E>
graph::Graph* otawa::GenGraph< N, E >::_ ( void  )
inline
template<class N, class E>
void otawa::GenGraph< N, E >::add ( GenNode node)
inline
void otawa::graph::Graph::add ( Node node)
inherited
template<class N, class E>
template<template< class _ > class C>
void otawa::GenGraph< N, E >::addAll ( const C< N * > &  items)
inline
template<template< class _ > class C>
void otawa::graph::Graph::addAll ( const C< Node * > &  items)
inlineinherited
template<class N, class E>
void otawa::GenGraph< N, E >::clear ( void  )
inline
template<class N, class E>
bool otawa::GenGraph< N, E >::contains ( N *  item) const
inline
bool otawa::graph::Graph::contains ( Node item) const
inlineinherited
template<class N, class E>
int otawa::GenGraph< N, E >::count ( void  ) const
inline
template<class N, class E>
int otawa::GenGraph< N, E >::inDegree ( N *  vertex) const
inline
int otawa::graph::Graph::inDegree ( Node vertex) const
inherited

Get the in degree of the given vertex.

Parameters
vertexVertex to compute out degree for.
Returns
Out degree of the vertex.

References otawa::cfgio::edge().

template<class N, class E>
int otawa::GenGraph< N, E >::indexOf ( N *  vertex) const
inline
int otawa::graph::Graph::indexOf ( Node vertex) const
inlineinherited
template<class N, class E>
bool otawa::GenGraph< N, E >::isEmpty ( void  ) const
inline
template<class N, class E>
bool otawa::GenGraph< N, E >::isPredecessorOf ( N *  succ,
N *  ref 
) const
inline
bool otawa::graph::Graph::isPredecessorOf ( Node pred,
Node ref 
) const
inherited

Test if the vertex pred is predecessor of the vertex ref.

Parameters
predPredecessor vertex.
refReference vertex.
Returns
True if pred is predecessor, false else.

References otawa::cfgio::edge().

template<class N, class E>
bool otawa::GenGraph< N, E >::isSuccessorOf ( N *  succ,
N *  ref 
) const
inline
bool otawa::graph::Graph::isSuccessorOf ( Node succ,
Node ref 
) const
inherited

Test if the vertex succ is successor of the vertex ref.

Parameters
succSuccessor vertex.
refReference vertex.
Returns
True if succ is successor, false else.

References otawa::cfgio::edge().

template<class N, class E>
otawa::GenGraph< N, E >::operator bool ( void  ) const
inline
template<class N, class E>
int otawa::GenGraph< N, E >::outDegree ( N *  vertex) const
inline
int otawa::graph::Graph::outDegree ( Node vertex) const
inherited

Get the out degree of the given vertex.

Parameters
vertexVertex to compute out degree for.
Returns
Out degree of the vertex.

References otawa::cfgio::edge().

template<class N, class E>
void otawa::GenGraph< N, E >::remove ( GenNode node)
inline
template<class N, class E>
void otawa::GenGraph< N, E >::remove ( GenEdge edge)
inline
void otawa::graph::Graph::remove ( Node node)
inherited

Remove a node from a graph.

Parameters
nodeNode to remove.

References otawa::graph::Node::_graph, otawa::graph::Node::graph(), otawa::graph::Node::idx, and otawa::graph::Node::unlink().

void otawa::graph::Graph::remove ( const Iterator iter)
inlineinherited
template<class N, class E>
template<template< class _ > class C>
void otawa::GenGraph< N, E >::removeAll ( const C< N * > &  items)
inline
template<template< class _ > class C>
void otawa::graph::Graph::removeAll ( const C< Node * > &  items)
inlineinherited
template<class N, class E>
N* otawa::GenGraph< N, E >::sinkOf ( E *  edge) const
inline
Node* otawa::graph::Graph::sinkOf ( graph::Edge edge) const
inlineinherited
template<class N, class E>
N* otawa::GenGraph< N, E >::sourceOf ( E *  edge) const
inline
Node* otawa::graph::Graph::sourceOf ( graph::Edge edge) const
inlineinherited

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