tlp::GraphObserver Class Reference
[Graphs]
That class receives a message (call back/handler function) after each modification of a Graph.
More...
#include <ObservableGraph.h>
List of all members.
Classes
Public Member Functions
- GraphObserver ()
- virtual ~GraphObserver ()
- GraphObserver (const GraphObserver &)
- GraphObserver & operator= (const GraphObserver &)
- virtual void addNode (Graph *, const node)
- virtual void addEdge (Graph *, const edge)
- virtual void beforeSetEnds (Graph *, const edge)
- virtual void afterSetEnds (Graph *, const edge)
- virtual void delNode (Graph *, const node)
- virtual void delEdge (Graph *, const edge)
- virtual void reverseEdge (Graph *, const edge)
- virtual void destroy (Graph *)
- virtual void addSubGraph (Graph *, Graph *)
- virtual void delSubGraph (Graph *, Graph *)
- virtual void addLocalProperty (Graph *, const std::string &)
- virtual void beforeDelLocalProperty (Graph *g, const std::string &pName)
- virtual void afterDelLocalProperty (Graph *, const std::string &)
- virtual void delLocalProperty (Graph *, const std::string &)
- virtual void addInheritedProperty (Graph *, const std::string &)
- virtual void beforeDelInheritedProperty (Graph *, const std::string &)
- virtual void afterDelInheritedProperty (Graph *, const std::string &)
- virtual void beforeSetAttribute (Graph *, const std::string &)
- virtual void afterSetAttribute (Graph *, const std::string &)
- virtual void removeAttribute (Graph *, const std::string &)
Friends
Detailed Description
That class receives a message (call back/handler function) after each modification of a Graph.
To receive a notification from an ObservableGraph, the GraphObserver must first be connected to the ObservableGraph. This is done by calling ObservableGraph::addGraphObserver.
Depending on which messages you want to receive, you need to override different functions of GraphObserver.
If manageObservables is set to true, the GraphObserver will automatically unregister from an ObservableGraph when deleted. (ie, unregistering is done automatically)
The Observer pattern is described pp293-304 of the book 'Design Patterns' by Gamma, Helm, Johnson, and Vlissides.
Constructor & Destructor Documentation
tlp::GraphObserver::GraphObserver |
( |
|
) |
[inline] |
virtual tlp::GraphObserver::~GraphObserver |
( |
|
) |
[inline, virtual] |
tlp::GraphObserver::GraphObserver |
( |
const GraphObserver & |
|
) |
[inline] |
Member Function Documentation
virtual void tlp::GraphObserver::addEdge |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::addInheritedProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::addLocalProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::addNode |
( |
Graph * |
, |
|
|
const |
node | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::addSubGraph |
( |
Graph * |
, |
|
|
Graph * |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::afterDelInheritedProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::afterDelLocalProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::afterSetAttribute |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::afterSetEnds |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::beforeDelInheritedProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::beforeDelLocalProperty |
( |
Graph * |
g, |
|
|
const std::string & |
pName | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::beforeSetAttribute |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::beforeSetEnds |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::delEdge |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::delLocalProperty |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::delNode |
( |
Graph * |
, |
|
|
const |
node | |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::delSubGraph |
( |
Graph * |
, |
|
|
Graph * |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::destroy |
( |
Graph * |
|
) |
[inline, virtual] |
virtual void tlp::GraphObserver::removeAttribute |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::reverseEdge |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
Friends And Related Function Documentation
friend class Graph [friend] |
friend class Observergraph [friend] |
|