[Lemon-commits] [lemon_svn] deba: r1430 - hugo/trunk/src/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:45:23 CET 2006
Author: deba
Date: Thu Dec 16 13:44:49 2004
New Revision: 1430
Modified:
hugo/trunk/src/lemon/alteration_notifier.h
hugo/trunk/src/lemon/list_graph.h
hugo/trunk/src/lemon/smart_graph.h
Log:
AlterationObserverRegistry -> AlterationNotifier
third step
Modified: hugo/trunk/src/lemon/alteration_notifier.h
==============================================================================
--- hugo/trunk/src/lemon/alteration_notifier.h (original)
+++ hugo/trunk/src/lemon/alteration_notifier.h Thu Dec 16 13:44:49 2004
@@ -192,8 +192,8 @@
/// Assign operator.
/// Assign operator for the AlterationNotifier.
- /// It makes the registry only empty because the copiable
- /// registry's observers have to be registered still into that registry.
+ /// It makes the notifier only empty because the copiable
+ /// notifier's observers have to be registered still into that registry.
AlterationNotifier& operator=(const AlterationNotifier&) {
typename Container::iterator it;
for (it = container.begin(); it != container.end(); ++it) {
@@ -315,23 +315,23 @@
protected:
- mutable EdgeNotifier edge_observers;
+ mutable EdgeNotifier edge_notifier;
- mutable NodeNotifier node_observers;
+ mutable NodeNotifier node_notifier;
public:
EdgeNotifier& getNotifier(Edge = INVALID) const {
- return edge_observers;
+ return edge_notifier;
}
NodeNotifier& getNotifier(Node = INVALID) const {
- return node_observers;
+ return node_notifier;
}
~AlterableGraphExtender() {
- node_observers.clear();
- edge_observers.clear();
+ node_notifier.clear();
+ edge_notifier.clear();
}
};
@@ -362,17 +362,17 @@
protected:
- mutable UndirEdgeNotifier undir_edge_observers;
+ mutable UndirEdgeNotifier undir_edge_notifier;
public:
using Parent::getNotifier;
UndirEdgeNotifier& getNotifier(UndirEdge) const {
- return undir_edge_observers;
+ return undir_edge_notifier;
}
~AlterableUndirGraphExtender() {
- undir_edge_observers.clear();
+ undir_edge_notifier.clear();
}
};
Modified: hugo/trunk/src/lemon/list_graph.h
==============================================================================
--- hugo/trunk/src/lemon/list_graph.h (original)
+++ hugo/trunk/src/lemon/list_graph.h Thu Dec 16 13:44:49 2004
@@ -431,9 +431,9 @@
void regist(ListGraph &_g) {
g=&_g;
AlterationNotifier<Node>::ObserverBase::
- attach(g->node_observers);
+ attach(g->getNotifier(Node()));
AlterationNotifier<Edge>::ObserverBase::
- attach(g->edge_observers);
+ attach(g->getNotifier(Edge()));
}
void deregist() {
Modified: hugo/trunk/src/lemon/smart_graph.h
==============================================================================
--- hugo/trunk/src/lemon/smart_graph.h (original)
+++ hugo/trunk/src/lemon/smart_graph.h Thu Dec 16 13:44:49 2004
@@ -267,14 +267,14 @@
void restoreSnapShot(const SnapShot &s)
{
while(s.edge_num>edges.size()) {
- edge_observers.erase(Edge(edges.size()-1));
+ Parent::getNotifier(Edge()).erase(Edge(edges.size()-1));
nodes[edges.back().target].first_in=edges.back().next_in;
nodes[edges.back().source].first_out=edges.back().next_out;
edges.pop_back();
}
//nodes.resize(s.nodes_num);
while(s.node_num>nodes.size()) {
- node_observers.erase(Node(nodes.size()-1));
+ Parent::getNotifier(Node()).erase(Node(nodes.size()-1));
nodes.pop_back();
}
}
More information about the Lemon-commits
mailing list