That class receives a message (call back/handler function) after each modification of a Graph.
More...
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 &) |
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.