#include <ObservableGraph.hpp>
Inheritance diagram for ObservableGraph:


The ObservableGraph inherits from the Graph and the Subject. Thus, it's nodes and edges can be modified from outside. Whenever a node or edge is added or removed, the ObservableGraph notifies it's observers. A notification also occurs when the ID of a node or edge changes.
Public Member Functions | |
| ObservableGraph () | |
| Constructor. | |
| ObservableGraph (PropertyFacility *p) | |
| Initializes the graph. | |
| ObservableGraph (const ObservableGraph &g) | |
| Copy constructor. | |
| virtual | ~ObservableGraph () |
| Destructor. | |
| virtual void | node_id (Node n, const NodeID id) |
| Set the ID of a node and invoke an update message. | |
| virtual void | edge_id (Edge e, const EdgeID id) |
| Set the ID of an edge and invoke an update message. | |
| virtual Node | new_node (NodeID id="") |
| Add a node to the graph and notify the observers. | |
| virtual void | del_node (Node n) |
| Delete a node from the graph, notify the observers before and after the delete operation. | |
| virtual Edge | new_edge (Node u, Node v, EdgeID id="") |
| Add an edge to the graph and notify the observers. | |
| virtual void | del_edge (Edge e) |
| Delete an edge from the graph, notify the observers before and after the delete operation. | |
| virtual void | del_edge (Node u, Node v) |
| Delete a(ll) directed (u,v) edge(s) from the graph, notify the observers before and after the delete operation. | |
| virtual void | add_nodes (int num, int start) |
| Convenient method to add nodes to the graph. | |
|
|
Constructor.
|
|
|
Initializes the graph.
|
|
|
Copy constructor.
|
|
|
Destructor.
|
|
||||||||||||
|
Convenient method to add nodes to the graph.
Reimplemented from Graph. |
|
||||||||||||
|
Delete a(ll) directed (u,v) edge(s) from the graph, notify the observers before and after the delete operation. See Graph::del_edge(u, v).
Reimplemented from Graph. |
|
|
Delete an edge from the graph, notify the observers before and after the delete operation. See Graph::del_edge(e).
Reimplemented from Graph. |
|
|
Delete a node from the graph, notify the observers before and after the delete operation. See Graph::del_node(n).
Reimplemented from Graph. |
|
||||||||||||
|
Set the ID of an edge and invoke an update message. See Graph::edge_id(e, id). Reimplemented from ConstGraph. |
|
||||||||||||||||
|
Add an edge to the graph and notify the observers. See Graph::new_edge(u, v, id).
Reimplemented from Graph. |
|
|
Add a node to the graph and notify the observers. See Graph::new_node(id).
Reimplemented from Graph. |
|
||||||||||||
|
Set the ID of a node and invoke an update message. See Graph::node_id(n, id). Reimplemented from ConstGraph. |
1.4.1