[Lemon-commits] [lemon_svn] deba: r1428 - hugo/trunk/src/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:45:22 CET 2006
Author: deba
Date: Thu Dec 16 13:15:02 2004
New Revision: 1428
Modified:
hugo/trunk/src/lemon/alteration_observer_registry.h
Log:
Renaming AlterationObserverRegistry -> AlterationNotifier
first step
Modified: hugo/trunk/src/lemon/alteration_observer_registry.h
==============================================================================
--- hugo/trunk/src/lemon/alteration_observer_registry.h (original)
+++ hugo/trunk/src/lemon/alteration_observer_registry.h Thu Dec 16 13:15:02 2004
@@ -1,5 +1,5 @@
/* -*- C++ -*-
- * src/lemon/observer_registry.h - Part of LEMON, a generic C++ optimization library
+ * src/lemon/notifier.h - Part of LEMON, a generic C++ optimization library
*
* Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Combinatorial Optimization Research Group, EGRES).
@@ -36,7 +36,7 @@
/// This class is a registry for the objects which observe the
/// alterations in a container. The alteration observers can be attached
/// to and detached from the registry. The observers have to inherit
- /// from the \ref AlterationObserverRegistry::ObserverBase and override
+ /// from the \ref AlterationNotifier::ObserverBase and override
/// the virtual functions in that.
///
/// The most important application of the alteration observing is the
@@ -49,7 +49,7 @@
/// \author Balazs Dezso
template <typename _Item>
- class AlterationObserverRegistry {
+ class AlterationNotifier {
public:
typedef _Item Item;
@@ -72,9 +72,9 @@
class ObserverBase {
protected:
- typedef AlterationObserverRegistry Registry;
+ typedef AlterationNotifier Registry;
- friend class AlterationObserverRegistry;
+ friend class AlterationNotifier;
/// Default constructor.
@@ -84,18 +84,18 @@
virtual ~ObserverBase() {}
- /// Attaches the observer into an AlterationObserverRegistry.
+ /// Attaches the observer into an AlterationNotifier.
- /// This member attaches the observer into an AlterationObserverRegistry.
+ /// This member attaches the observer into an AlterationNotifier.
///
- void attach(AlterationObserverRegistry& r) {
+ void attach(AlterationNotifier& r) {
registry = &r;
registry->attach(*this);
}
- /// Detaches the observer into an AlterationObserverRegistry.
+ /// Detaches the observer into an AlterationNotifier.
- /// This member detaches the observer from an AlterationObserverRegistry.
+ /// This member detaches the observer from an AlterationNotifier.
///
void detach() {
if (registry) {
@@ -178,23 +178,23 @@
/// Default constructor.
///
- /// The default constructor of the AlterationObserverRegistry.
+ /// The default constructor of the AlterationNotifier.
/// It creates an empty registry.
- AlterationObserverRegistry() {}
+ AlterationNotifier() {}
- /// Copy Constructor of the AlterationObserverRegistry.
+ /// Copy Constructor of the AlterationNotifier.
- /// Copy constructor of the AlterationObserverRegistry.
+ /// Copy constructor of the AlterationNotifier.
/// It creates only an empty registry because the copiable
/// registry's observers have to be registered still into that registry.
- AlterationObserverRegistry(const AlterationObserverRegistry&) {}
+ AlterationNotifier(const AlterationObserverRegistry&) {}
/// Assign operator.
- /// Assign operator for the AlterationObserverRegistry.
+ /// 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.
- AlterationObserverRegistry& operator=(const AlterationObserverRegistry&) {
+ AlterationNotifier& operator=(const AlterationObserverRegistry&) {
typename Container::iterator it;
for (it = container.begin(); it != container.end(); ++it) {
(*it)->registry = 0;
@@ -203,9 +203,9 @@
/// Destructor.
- /// Destructor of the AlterationObserverRegistry.
+ /// Destructor of the AlterationNotifier.
///
- ~AlterationObserverRegistry() {
+ ~AlterationNotifier() {
typename Container::iterator it;
for (it = container.begin(); it != container.end(); ++it) {
(*it)->registry = 0;
@@ -308,24 +308,24 @@
typedef typename Parent::Edge Edge;
/// The edge observer registry.
- typedef AlterationObserverRegistry<Edge> EdgeObserverRegistry;
+ typedef AlterationNotifier<Edge> EdgeObserverRegistry;
/// The node observer registry.
- typedef AlterationObserverRegistry<Node> NodeObserverRegistry;
+ typedef AlterationNotifier<Node> NodeObserverRegistry;
protected:
- mutable EdgeObserverRegistry edge_observers;
+ mutable EdgeNotifier edge_observers;
- mutable NodeObserverRegistry node_observers;
+ mutable NodeNotifier node_observers;
public:
- EdgeObserverRegistry& getObserverRegistry(Edge = INVALID) const {
+ EdgeNotifier& getObserverRegistry(Edge = INVALID) const {
return edge_observers;
}
- NodeObserverRegistry& getObserverRegistry(Node = INVALID) const {
+ NodeNotifier& getObserverRegistry(Node = INVALID) const {
return node_observers;
}
@@ -358,16 +358,16 @@
typedef typename Parent::UndirEdge UndirEdge;
/// The edge observer registry.
- typedef AlterationObserverRegistry<UndirEdge> UndirEdgeObserverRegistry;
+ typedef AlterationNotifier<UndirEdge> UndirEdgeObserverRegistry;
protected:
- mutable UndirEdgeObserverRegistry undir_edge_observers;
+ mutable UndirEdgeNotifier undir_edge_observers;
public:
- using Parent::getObserverRegistry;
- UndirEdgeObserverRegistry& getObserverRegistry(UndirEdge) const {
+ using Parent::getNotifier;
+ UndirEdgeNotifier& getObserverRegistry(UndirEdge) const {
return undir_edge_observers;
}
More information about the Lemon-commits
mailing list