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.
Public Member Functions
- GraphObserver (bool manageObservables=true)
- virtual ~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 delLocalProperty (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 &)
Protected Member Functions
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 |
( |
bool |
manageObservables = true |
) |
[inline] |
virtual tlp::GraphObserver::~GraphObserver |
( |
|
) |
[virtual] |
Member Function Documentation
virtual void tlp::GraphObserver::addEdge |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [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::afterSetAttribute |
( |
Graph * |
, |
|
|
const std::string & |
| |
|
) |
| | [inline, virtual] |
virtual void tlp::GraphObserver::afterSetEnds |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [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] |
void tlp::GraphObserver::removeObservable |
( |
ObservableGraph * |
|
) |
[protected] |
virtual void tlp::GraphObserver::reverseEdge |
( |
Graph * |
, |
|
|
const |
edge | |
|
) |
| | [inline, virtual] |
Friends And Related Function Documentation
|