Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::GraphObserver Class Reference

Abstract Base class for classes that need to keep track of changes in the graph like addition/deletion of nodes or edges. derived classes have to overload nodeDeleted, nodeAdded edgeDeleted, edgeAdded these functions should be called by Graph before (delete). More...

#include <GraphObserver.h>

Inheritance diagram for ogdf::GraphObserver:

ogdf::ClusterGraph ogdf::PlanRepInc ogdf::ClusterGraphCopy

List of all members.

Public Member Functions

 GraphObserver ()
 Constructs instance of GraphObserver class.
 GraphObserver (const Graph *G)
 Constructs instance of GraphObserver class.
virtual ~GraphObserver ()
 Destroys the instance, unregisters it from watched graph.
void reregister (const Graph *pG)
 Associates observer instance with graph G.
virtual void nodeDeleted (node v)=0
virtual void nodeAdded (node v)=0
virtual void edgeDeleted (edge e)=0
virtual void edgeAdded (edge e)=0
virtual void reInit ()=0
virtual void cleared ()=0
const GraphgetGraph () const

Protected Attributes

const Graphm_pGraph
ListIterator< GraphObserver * > m_itGList
 watched graph

Friends

class Graph


Detailed Description

Abstract Base class for classes that need to keep track of changes in the graph like addition/deletion of nodes or edges. derived classes have to overload nodeDeleted, nodeAdded edgeDeleted, edgeAdded these functions should be called by Graph before (delete).

Definition at line 92 of file GraphObserver.h.


Constructor & Destructor Documentation

ogdf::GraphObserver::GraphObserver (  )  [inline]

Constructs instance of GraphObserver class.

Definition at line 97 of file GraphObserver.h.

ogdf::GraphObserver::GraphObserver ( const Graph G  )  [inline]

Constructs instance of GraphObserver class.

Parameters:
G is the graph to be watched

Definition at line 102 of file GraphObserver.h.

virtual ogdf::GraphObserver::~GraphObserver (  )  [inline, virtual]

Destroys the instance, unregisters it from watched graph.

Definition at line 107 of file GraphObserver.h.


Member Function Documentation

void ogdf::GraphObserver::reregister ( const Graph pG  )  [inline]

Associates observer instance with graph G.

Definition at line 113 of file GraphObserver.h.

virtual void ogdf::GraphObserver::nodeDeleted ( node  v  )  [pure virtual]

Called by watched graph when a node is deleted Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

virtual void ogdf::GraphObserver::nodeAdded ( node  v  )  [pure virtual]

Called by watched graph when a node is added Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

virtual void ogdf::GraphObserver::edgeDeleted ( edge  e  )  [pure virtual]

Called by watched graph when an edge is deleted Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

virtual void ogdf::GraphObserver::edgeAdded ( edge  e  )  [pure virtual]

Called by watched graph when an edge is added Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

virtual void ogdf::GraphObserver::reInit (  )  [pure virtual]

Called by watched graph when it is reinitialized Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

virtual void ogdf::GraphObserver::cleared (  )  [pure virtual]

Called by watched graph when its clear function is called Has to be implemented by derived classes

Implemented in ogdf::ClusterGraph, and ogdf::PlanRepInc.

const Graph* ogdf::GraphObserver::getGraph (  )  const [inline]

Reimplemented in ogdf::ClusterGraph.

Definition at line 138 of file GraphObserver.h.


Friends And Related Function Documentation

friend class Graph [friend]

Definition at line 93 of file GraphObserver.h.


Member Data Documentation

const Graph* ogdf::GraphObserver::m_pGraph [protected]

Reimplemented in ogdf::ClusterGraph.

Definition at line 141 of file GraphObserver.h.

ListIterator<GraphObserver*> ogdf::GraphObserver::m_itGList [protected]

watched graph

Definition at line 142 of file GraphObserver.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:08 2007 by doxygen 1.5.4.