diff -r 545926902c13 -r 805c5a2a36dd lemon/bits/array_map.h --- a/lemon/bits/array_map.h Thu Mar 01 16:50:12 2007 +0000 +++ b/lemon/bits/array_map.h Thu Mar 01 17:14:24 2007 +0000 @@ -79,9 +79,9 @@ /// /// Graph initialized map constructor. explicit ArrayMap(const Graph& graph) { - Parent::attach(graph.getNotifier(Item())); + Parent::attach(graph.notifier(Item())); allocate_memory(); - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { int id = notifier->id(it);; @@ -93,9 +93,9 @@ /// /// It constructs a map and initialize all of the the map. ArrayMap(const Graph& graph, const Value& value) { - Parent::attach(graph.getNotifier(Item())); + Parent::attach(graph.notifier(Item())); allocate_memory(); - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { int id = notifier->id(it);; @@ -108,12 +108,12 @@ /// Constructor to copy a map of the same map type. ArrayMap(const ArrayMap& copy) : Parent() { if (copy.attached()) { - attach(*copy.getNotifier()); + attach(*copy.notifier()); } capacity = copy.capacity; if (capacity == 0) return; values = allocator.allocate(capacity); - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { int id = notifier->id(it);; @@ -142,7 +142,7 @@ template ArrayMap& operator=(const CMap& cmap) { checkConcept, CMap>(); - const typename Parent::Notifier* notifier = Parent::getNotifier(); + const typename Parent::Notifier* notifier = Parent::notifier(); Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { set(it, cmap[it]); @@ -173,7 +173,7 @@ /// The subscript operator. The map can be subscripted by the /// actual keys of the graph. Value& operator[](const Key& key) { - int id = Parent::getNotifier()->id(key); + int id = Parent::notifier()->id(key); return values[id]; } @@ -182,7 +182,7 @@ /// The const subscript operator. The map can be subscripted by the /// actual keys of the graph. const Value& operator[](const Key& key) const { - int id = Parent::getNotifier()->id(key); + int id = Parent::notifier()->id(key); return values[id]; } @@ -201,7 +201,7 @@ /// It adds a new key to the map. It called by the observer notifier /// and it overrides the add() member function of the observer base. virtual void add(const Key& key) { - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); int id = notifier->id(key); if (id >= capacity) { int new_capacity = (capacity == 0 ? 1 : capacity); @@ -229,7 +229,7 @@ /// It adds more new keys to the map. It called by the observer notifier /// and it overrides the add() member function of the observer base. virtual void add(const std::vector& keys) { - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); int max_id = -1; for (int i = 0; i < (int)keys.size(); ++i) { int id = notifier->id(keys[i]); @@ -273,7 +273,7 @@ /// Erase a key from the map. It called by the observer notifier /// and it overrides the erase() member function of the observer base. virtual void erase(const Key& key) { - int id = Parent::getNotifier()->id(key); + int id = Parent::notifier()->id(key); allocator.destroy(&(values[id])); } @@ -283,7 +283,7 @@ /// and it overrides the erase() member function of the observer base. virtual void erase(const std::vector& keys) { for (int i = 0; i < (int)keys.size(); ++i) { - int id = Parent::getNotifier()->id(keys[i]); + int id = Parent::notifier()->id(keys[i]); allocator.destroy(&(values[id])); } } @@ -293,7 +293,7 @@ /// It buildes the map. It called by the observer notifier /// and it overrides the build() member function of the observer base. virtual void build() { - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); allocate_memory(); Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { @@ -307,7 +307,7 @@ /// It erase all items from the map. It called by the observer notifier /// and it overrides the clear() member function of the observer base. virtual void clear() { - Notifier* notifier = Parent::getNotifier(); + Notifier* notifier = Parent::notifier(); if (capacity != 0) { Item it; for (notifier->first(it); it != INVALID; notifier->next(it)) { @@ -322,7 +322,7 @@ private: void allocate_memory() { - int max_id = Parent::getNotifier()->maxId(); + int max_id = Parent::notifier()->maxId(); if (max_id == -1) { capacity = 0; values = 0;