[Lemon-commits] deba: r3216 - in lemon/trunk/lemon: . bits concepts
Lemon SVN
svn at lemon.cs.elte.hu
Thu Mar 1 18:14:25 CET 2007
Author: deba
Date: Thu Mar 1 18:14:24 2007
New Revision: 3216
Modified:
lemon/trunk/lemon/bits/alteration_notifier.h
lemon/trunk/lemon/bits/array_map.h
lemon/trunk/lemon/bits/debug_map.h
lemon/trunk/lemon/bits/edge_set_extender.h
lemon/trunk/lemon/bits/graph_extender.h
lemon/trunk/lemon/bits/map_extender.h
lemon/trunk/lemon/bits/vector_map.h
lemon/trunk/lemon/bpugraph_adaptor.h
lemon/trunk/lemon/concepts/graph_components.h
lemon/trunk/lemon/edge_set.h
lemon/trunk/lemon/full_graph.h
lemon/trunk/lemon/graph_adaptor.h
lemon/trunk/lemon/graph_utils.h
lemon/trunk/lemon/grid_ugraph.h
lemon/trunk/lemon/matrix_maps.h
Log:
getNotifier to notifier renaming
Modified: lemon/trunk/lemon/bits/alteration_notifier.h
==============================================================================
--- lemon/trunk/lemon/bits/alteration_notifier.h (original)
+++ lemon/trunk/lemon/bits/alteration_notifier.h Thu Mar 1 18:14:24 2007
@@ -143,13 +143,13 @@
///
/// Default constructor for ObserverBase.
///
- ObserverBase() : notifier(0) {}
+ ObserverBase() : _notifier(0) {}
/// \brief Constructor which attach the observer into notifier.
///
/// Constructor which attach the observer into notifier.
- ObserverBase(AlterationNotifier& _notifier) {
- attach(_notifier);
+ ObserverBase(AlterationNotifier& notifier) {
+ attach(notifier);
}
/// \brief Constructor which attach the obserever to the same notifier.
@@ -158,7 +158,7 @@
/// the other observer is attached to.
ObserverBase(const ObserverBase& copy) {
if (copy.attached()) {
- attach(*copy.getNotifier());
+ attach(*copy._notifier());
}
}
@@ -173,8 +173,8 @@
///
/// This member attaches the observer into an AlterationNotifier.
///
- void attach(AlterationNotifier& _notifier) {
- _notifier.attach(*this);
+ void attach(AlterationNotifier& notifier) {
+ notifier.attach(*this);
}
/// \brief Detaches the observer into an AlterationNotifier.
@@ -182,7 +182,7 @@
/// This member detaches the observer from an AlterationNotifier.
///
void detach() {
- notifier->detach(*this);
+ _notifier->detach(*this);
}
/// \brief Gives back a pointer to the notifier which the map
@@ -191,10 +191,10 @@
/// This function gives back a pointer to the notifier which the map
/// attached into.
///
- Notifier* getNotifier() const { return const_cast<Notifier*>(notifier); }
+ Notifier* notifier() const { return const_cast<Notifier*>(_notifier); }
/// Gives back true when the observer is attached into a notifier.
- bool attached() const { return notifier != 0; }
+ bool attached() const { return _notifier != 0; }
private:
@@ -202,8 +202,8 @@
protected:
- Notifier* notifier;
- typename std::list<ObserverBase*>::iterator index;
+ Notifier* _notifier;
+ typename std::list<ObserverBase*>::iterator _index;
/// \brief The member function to notificate the observer about an
/// item is added to the container.
@@ -261,7 +261,7 @@
const Container* container;
typedef std::list<ObserverBase*> Observers;
- Observers observers;
+ Observers _observers;
public:
@@ -293,8 +293,8 @@
///
~AlterationNotifier() {
typename Observers::iterator it;
- for (it = observers.begin(); it != observers.end(); ++it) {
- (*it)->notifier = 0;
+ for (it = _observers.begin(); it != _observers.end(); ++it) {
+ (*it)->_notifier = 0;
}
}
@@ -346,14 +346,14 @@
protected:
void attach(ObserverBase& observer) {
- observer.index = observers.insert(observers.begin(), &observer);
- observer.notifier = this;
+ observer._index = _observers.insert(_observers.begin(), &observer);
+ observer._notifier = this;
}
void detach(ObserverBase& observer) {
- observers.erase(observer.index);
- observer.index = observers.end();
- observer.notifier = 0;
+ _observers.erase(observer._index);
+ observer._index = _observers.end();
+ observer._notifier = 0;
}
public:
@@ -367,12 +367,12 @@
void add(const Item& item) {
typename Observers::reverse_iterator it;
try {
- for (it = observers.rbegin(); it != observers.rend(); ++it) {
+ for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
(*it)->add(item);
}
} catch (...) {
typename Observers::iterator jt;
- for (jt = it.base(); jt != observers.end(); ++jt) {
+ for (jt = it.base(); jt != _observers.end(); ++jt) {
(*jt)->erase(item);
}
throw;
@@ -388,12 +388,12 @@
void add(const std::vector<Item>& items) {
typename Observers::reverse_iterator it;
try {
- for (it = observers.rbegin(); it != observers.rend(); ++it) {
+ for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
(*it)->add(items);
}
} catch (...) {
typename Observers::iterator jt;
- for (jt = it.base(); jt != observers.end(); ++jt) {
+ for (jt = it.base(); jt != _observers.end(); ++jt) {
(*jt)->erase(items);
}
throw;
@@ -407,15 +407,15 @@
/// the container.
///
void erase(const Item& item) throw() {
- typename Observers::iterator it = observers.begin();
- while (it != observers.end()) {
+ typename Observers::iterator it = _observers.begin();
+ while (it != _observers.end()) {
try {
(*it)->erase(item);
++it;
} catch (const ImmediateDetach&) {
- it = observers.erase(it);
- (*it)->index = observers.end();
- (*it)->notifier = 0;
+ it = _observers.erase(it);
+ (*it)->_index = _observers.end();
+ (*it)->_notifier = 0;
}
}
}
@@ -427,15 +427,15 @@
/// the container.
///
void erase(const std::vector<Item>& items) {
- typename Observers::iterator it = observers.begin();
- while (it != observers.end()) {
+ typename Observers::iterator it = _observers.begin();
+ while (it != _observers.end()) {
try {
(*it)->erase(items);
++it;
} catch (const ImmediateDetach&) {
- it = observers.erase(it);
- (*it)->index = observers.end();
- (*it)->notifier = 0;
+ it = _observers.erase(it);
+ (*it)->_index = _observers.end();
+ (*it)->_notifier = 0;
}
}
}
@@ -448,12 +448,12 @@
void build() {
typename Observers::reverse_iterator it;
try {
- for (it = observers.rbegin(); it != observers.rend(); ++it) {
+ for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
(*it)->build();
}
} catch (...) {
typename Observers::iterator jt;
- for (jt = it.base(); jt != observers.end(); ++jt) {
+ for (jt = it.base(); jt != _observers.end(); ++jt) {
(*jt)->clear();
}
throw;
@@ -466,15 +466,15 @@
/// Notifies all the registed observers about all items are erased
/// from the container.
void clear() {
- typename Observers::iterator it = observers.begin();
- while (it != observers.end()) {
+ typename Observers::iterator it = _observers.begin();
+ while (it != _observers.end()) {
try {
(*it)->clear();
++it;
} catch (const ImmediateDetach&) {
- it = observers.erase(it);
- (*it)->index = observers.end();
- (*it)->notifier = 0;
+ it = _observers.erase(it);
+ (*it)->_index = _observers.end();
+ (*it)->_notifier = 0;
}
}
}
Modified: lemon/trunk/lemon/bits/array_map.h
==============================================================================
--- lemon/trunk/lemon/bits/array_map.h (original)
+++ lemon/trunk/lemon/bits/array_map.h Thu Mar 1 18:14:24 2007
@@ -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 <typename CMap>
ArrayMap& operator=(const CMap& cmap) {
checkConcept<concepts::ReadMap<Key, _Value>, 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<Key>& 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<Key>& 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;
Modified: lemon/trunk/lemon/bits/debug_map.h
==============================================================================
--- lemon/trunk/lemon/bits/debug_map.h (original)
+++ lemon/trunk/lemon/bits/debug_map.h Thu Mar 1 18:14:24 2007
@@ -111,13 +111,13 @@
/// It constructs a map and attachs it into the notifier.
/// It adds all the items of the graph to the map.
DebugMap(const Graph& graph) {
- Parent::attach(graph.getNotifier(Item()));
- container.resize(Parent::getNotifier()->maxId() + 1);
- flag.resize(Parent::getNotifier()->maxId() + 1, false);
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ Parent::attach(graph.notifier(Item()));
+ container.resize(Parent::notifier()->maxId() + 1);
+ flag.resize(Parent::notifier()->maxId() + 1, false);
+ const typename Parent::Notifier* notifier = Parent::notifier();
Item it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
- flag[Parent::getNotifier()->id(it)] = true;
+ flag[Parent::notifier()->id(it)] = true;
}
}
@@ -126,13 +126,13 @@
/// It constructs a map uses a given value to initialize the map.
/// It adds all the items of the graph to the map.
DebugMap(const Graph& graph, const Value& value) {
- Parent::attach(graph.getNotifier(Item()));
- container.resize(Parent::getNotifier()->maxId() + 1, value);
- flag.resize(Parent::getNotifier()->maxId() + 1, false);
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ Parent::attach(graph.notifier(Item()));
+ container.resize(Parent::notifier()->maxId() + 1, value);
+ flag.resize(Parent::notifier()->maxId() + 1, false);
+ const typename Parent::Notifier* notifier = Parent::notifier();
Item it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
- flag[Parent::getNotifier()->id(it)] = true;
+ flag[Parent::notifier()->id(it)] = true;
}
}
@@ -141,15 +141,15 @@
/// Copy constructor.
DebugMap(const DebugMap& _copy) : Parent() {
if (_copy.attached()) {
- Parent::attach(*_copy.getNotifier());
+ Parent::attach(*_copy.notifier());
container = _copy.container;
}
- flag.resize(Parent::getNotifier()->maxId() + 1, false);
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ flag.resize(Parent::notifier()->maxId() + 1, false);
+ const typename Parent::Notifier* notifier = Parent::notifier();
Item it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
- flag[Parent::getNotifier()->id(it)] = true;
- LEMON_ASSERT(_copy.flag[Parent::getNotifier()->id(it)], MapError());
+ flag[Parent::notifier()->id(it)] = true;
+ LEMON_ASSERT(_copy.flag[Parent::notifier()->id(it)], MapError());
}
}
@@ -157,12 +157,12 @@
///
/// Destructor.
~DebugMap() {
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ const typename Parent::Notifier* notifier = Parent::notifier();
if (notifier != 0) {
Item it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
- LEMON_ASSERT(flag[Parent::getNotifier()->id(it)], MapError());
- flag[Parent::getNotifier()->id(it)] = false;
+ LEMON_ASSERT(flag[Parent::notifier()->id(it)], MapError());
+ flag[Parent::notifier()->id(it)] = false;
}
}
for (int i = 0; i < (int)flag.size(); ++i) {
@@ -191,7 +191,7 @@
template <typename CMap>
DebugMap& operator=(const CMap& cmap) {
checkConcept<concepts::ReadMap<Key, _Value>, 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]);
@@ -206,8 +206,8 @@
/// The subscript operator. The map can be subscripted by the
/// actual items of the graph.
Reference operator[](const Key& key) {
- LEMON_ASSERT(flag[Parent::getNotifier()->id(key)], MapError());
- return container[Parent::getNotifier()->id(key)];
+ LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
+ return container[Parent::notifier()->id(key)];
}
/// \brief The const subcript operator.
@@ -215,8 +215,8 @@
/// The const subscript operator. The map can be subscripted by the
/// actual items of the graph.
ConstReference operator[](const Key& key) const {
- LEMON_ASSERT(flag[Parent::getNotifier()->id(key)], MapError());
- return container[Parent::getNotifier()->id(key)];
+ LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
+ return container[Parent::notifier()->id(key)];
}
@@ -234,19 +234,19 @@
/// 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) {
- int id = Parent::getNotifier()->id(key);
+ int id = Parent::notifier()->id(key);
if (id >= (int)container.size()) {
container.resize(id + 1);
flag.resize(id + 1, false);
}
- LEMON_ASSERT(!flag[Parent::getNotifier()->id(key)], MapError());
- flag[Parent::getNotifier()->id(key)] = true;
+ LEMON_ASSERT(!flag[Parent::notifier()->id(key)], MapError());
+ flag[Parent::notifier()->id(key)] = true;
if (strictCheck) {
std::vector<bool> fl(flag.size(), false);
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
fl[id] = true;
}
LEMON_ASSERT(fl == flag, MapError());
@@ -260,7 +260,7 @@
virtual void add(const std::vector<Key>& keys) {
int max = container.size() - 1;
for (int i = 0; i < (int)keys.size(); ++i) {
- int id = Parent::getNotifier()->id(keys[i]);
+ int id = Parent::notifier()->id(keys[i]);
if (id >= max) {
max = id;
}
@@ -268,15 +268,15 @@
container.resize(max + 1);
flag.resize(max + 1, false);
for (int i = 0; i < (int)keys.size(); ++i) {
- LEMON_ASSERT(!flag[Parent::getNotifier()->id(keys[i])], MapError());
- flag[Parent::getNotifier()->id(keys[i])] = true;
+ LEMON_ASSERT(!flag[Parent::notifier()->id(keys[i])], MapError());
+ flag[Parent::notifier()->id(keys[i])] = true;
}
if (strictCheck) {
std::vector<bool> fl(flag.size(), false);
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
fl[id] = true;
}
LEMON_ASSERT(fl == flag, MapError());
@@ -290,17 +290,17 @@
virtual void erase(const Key& key) {
if (strictCheck) {
std::vector<bool> fl(flag.size(), false);
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
fl[id] = true;
}
LEMON_ASSERT(fl == flag, MapError());
}
- container[Parent::getNotifier()->id(key)] = Value();
- LEMON_ASSERT(flag[Parent::getNotifier()->id(key)], MapError());
- flag[Parent::getNotifier()->id(key)] = false;
+ container[Parent::notifier()->id(key)] = Value();
+ LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
+ flag[Parent::notifier()->id(key)] = false;
}
/// \brief Erase more keys from the map.
@@ -310,18 +310,18 @@
virtual void erase(const std::vector<Key>& keys) {
if (strictCheck) {
std::vector<bool> fl(flag.size(), false);
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
fl[id] = true;
}
LEMON_ASSERT(fl == flag, MapError());
}
for (int i = 0; i < (int)keys.size(); ++i) {
- container[Parent::getNotifier()->id(keys[i])] = Value();
- LEMON_ASSERT(flag[Parent::getNotifier()->id(keys[i])], MapError());
- flag[Parent::getNotifier()->id(keys[i])] = false;
+ container[Parent::notifier()->id(keys[i])] = Value();
+ LEMON_ASSERT(flag[Parent::notifier()->id(keys[i])], MapError());
+ flag[Parent::notifier()->id(keys[i])] = false;
}
}
@@ -335,15 +335,15 @@
LEMON_ASSERT(flag[i], MapError());
}
}
- int size = Parent::getNotifier()->maxId() + 1;
+ int size = Parent::notifier()->maxId() + 1;
container.reserve(size);
container.resize(size);
flag.reserve(size);
flag.resize(size, false);
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
LEMON_ASSERT(!flag[id], MapError());
flag[id] = true;
}
@@ -354,10 +354,10 @@
/// 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() {
- 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)) {
- int id = Parent::getNotifier()->id(it);
+ int id = Parent::notifier()->id(it);
LEMON_ASSERT(flag[id], MapError());
flag[id] = false;
}
Modified: lemon/trunk/lemon/bits/edge_set_extender.h
==============================================================================
--- lemon/trunk/lemon/bits/edge_set_extender.h (original)
+++ lemon/trunk/lemon/bits/edge_set_extender.h Thu Mar 1 18:14:24 2007
@@ -81,12 +81,12 @@
public:
- using Parent::getNotifier;
+ using Parent::notifier;
/// \brief Gives back the edge alteration notifier.
///
/// Gives back the edge alteration notifier.
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return edge_notifier;
}
@@ -246,17 +246,17 @@
Edge addEdge(const Node& from, const Node& to) {
Edge edge = Parent::addEdge(from, to);
- getNotifier(Edge()).add(edge);
+ notifier(Edge()).add(edge);
return edge;
}
void clear() {
- getNotifier(Edge()).clear();
+ notifier(Edge()).clear();
Parent::clear();
}
void erase(const Edge& edge) {
- getNotifier(Edge()).erase(edge);
+ notifier(Edge()).erase(edge);
Parent::erase(edge);
}
@@ -340,13 +340,13 @@
public:
- using Parent::getNotifier;
+ using Parent::notifier;
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return edge_notifier;
}
- UEdgeNotifier& getNotifier(UEdge) const {
+ UEdgeNotifier& notifier(UEdge) const {
return uedge_notifier;
}
@@ -589,22 +589,22 @@
UEdge addEdge(const Node& from, const Node& to) {
UEdge uedge = Parent::addEdge(from, to);
- getNotifier(UEdge()).add(uedge);
- getNotifier(Edge()).add(Parent::direct(uedge, true));
- getNotifier(Edge()).add(Parent::direct(uedge, false));
+ notifier(UEdge()).add(uedge);
+ notifier(Edge()).add(Parent::direct(uedge, true));
+ notifier(Edge()).add(Parent::direct(uedge, false));
return uedge;
}
void clear() {
- getNotifier(Edge()).clear();
- getNotifier(UEdge()).clear();
+ notifier(Edge()).clear();
+ notifier(UEdge()).clear();
Parent::clear();
}
void erase(const UEdge& uedge) {
- getNotifier(Edge()).erase(Parent::direct(uedge, true));
- getNotifier(Edge()).erase(Parent::direct(uedge, false));
- getNotifier(UEdge()).erase(uedge);
+ notifier(Edge()).erase(Parent::direct(uedge, true));
+ notifier(Edge()).erase(Parent::direct(uedge, false));
+ notifier(UEdge()).erase(uedge);
Parent::erase(uedge);
}
Modified: lemon/trunk/lemon/bits/graph_extender.h
==============================================================================
--- lemon/trunk/lemon/bits/graph_extender.h (original)
+++ lemon/trunk/lemon/bits/graph_extender.h Thu Mar 1 18:14:24 2007
@@ -86,11 +86,11 @@
public:
- NodeNotifier& getNotifier(Node) const {
+ NodeNotifier& notifier(Node) const {
return node_notifier;
}
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return edge_notifier;
}
@@ -266,27 +266,27 @@
Node addNode() {
Node node = Parent::addNode();
- getNotifier(Node()).add(node);
+ notifier(Node()).add(node);
return node;
}
Edge addEdge(const Node& from, const Node& to) {
Edge edge = Parent::addEdge(from, to);
- getNotifier(Edge()).add(edge);
+ notifier(Edge()).add(edge);
return edge;
}
void clear() {
- getNotifier(Edge()).clear();
- getNotifier(Node()).clear();
+ notifier(Edge()).clear();
+ notifier(Node()).clear();
Parent::clear();
}
template <typename Graph, typename NodeRefMap, typename EdgeRefMap>
void build(const Graph& graph, NodeRefMap& nodeRef, EdgeRefMap& edgeRef) {
Parent::build(graph, nodeRef, edgeRef);
- getNotifier(Node()).build();
- getNotifier(Edge()).build();
+ notifier(Node()).build();
+ notifier(Edge()).build();
}
void erase(const Node& node) {
@@ -303,12 +303,12 @@
Parent::firstIn(edge, node);
}
- getNotifier(Node()).erase(node);
+ notifier(Node()).erase(node);
Parent::erase(node);
}
void erase(const Edge& edge) {
- getNotifier(Edge()).erase(edge);
+ notifier(Edge()).erase(edge);
Parent::erase(edge);
}
@@ -397,15 +397,15 @@
public:
- NodeNotifier& getNotifier(Node) const {
+ NodeNotifier& notifier(Node) const {
return node_notifier;
}
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return edge_notifier;
}
- UEdgeNotifier& getNotifier(UEdge) const {
+ UEdgeNotifier& notifier(UEdge) const {
return uedge_notifier;
}
@@ -672,24 +672,24 @@
Node addNode() {
Node node = Parent::addNode();
- getNotifier(Node()).add(node);
+ notifier(Node()).add(node);
return node;
}
UEdge addEdge(const Node& from, const Node& to) {
UEdge uedge = Parent::addEdge(from, to);
- getNotifier(UEdge()).add(uedge);
+ notifier(UEdge()).add(uedge);
std::vector<Edge> edges;
edges.push_back(Parent::direct(uedge, true));
edges.push_back(Parent::direct(uedge, false));
- getNotifier(Edge()).add(edges);
+ notifier(Edge()).add(edges);
return uedge;
}
void clear() {
- getNotifier(Edge()).clear();
- getNotifier(UEdge()).clear();
- getNotifier(Node()).clear();
+ notifier(Edge()).clear();
+ notifier(UEdge()).clear();
+ notifier(Node()).clear();
Parent::clear();
}
@@ -697,9 +697,9 @@
void build(const Graph& graph, NodeRefMap& nodeRef,
UEdgeRefMap& uEdgeRef) {
Parent::build(graph, nodeRef, uEdgeRef);
- getNotifier(Node()).build();
- getNotifier(UEdge()).build();
- getNotifier(Edge()).build();
+ notifier(Node()).build();
+ notifier(UEdge()).build();
+ notifier(Edge()).build();
}
void erase(const Node& node) {
@@ -716,7 +716,7 @@
Parent::firstIn(edge, node);
}
- getNotifier(Node()).erase(node);
+ notifier(Node()).erase(node);
Parent::erase(node);
}
@@ -724,8 +724,8 @@
std::vector<Edge> edges;
edges.push_back(Parent::direct(uedge, true));
edges.push_back(Parent::direct(uedge, false));
- getNotifier(Edge()).erase(edges);
- getNotifier(UEdge()).erase(uedge);
+ notifier(Edge()).erase(edges);
+ notifier(UEdge()).erase(uedge);
Parent::erase(uedge);
}
@@ -823,23 +823,23 @@
public:
- NodeNotifier& getNotifier(Node) const {
+ NodeNotifier& notifier(Node) const {
return node_notifier;
}
- ANodeNotifier& getNotifier(ANode) const {
+ ANodeNotifier& notifier(ANode) const {
return anode_notifier;
}
- BNodeNotifier& getNotifier(BNode) const {
+ BNodeNotifier& notifier(BNode) const {
return bnode_notifier;
}
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return edge_notifier;
}
- UEdgeNotifier& getNotifier(UEdge) const {
+ UEdgeNotifier& notifier(UEdge) const {
return uedge_notifier;
}
@@ -1283,36 +1283,36 @@
Node addANode() {
Node node = Parent::addANode();
- getNotifier(ANode()).add(node);
- getNotifier(Node()).add(node);
+ notifier(ANode()).add(node);
+ notifier(Node()).add(node);
return node;
}
Node addBNode() {
Node node = Parent::addBNode();
- getNotifier(BNode()).add(node);
- getNotifier(Node()).add(node);
+ notifier(BNode()).add(node);
+ notifier(Node()).add(node);
return node;
}
UEdge addEdge(const Node& source, const Node& target) {
UEdge uedge = Parent::addEdge(source, target);
- getNotifier(UEdge()).add(uedge);
+ notifier(UEdge()).add(uedge);
std::vector<Edge> edges;
edges.push_back(Parent::direct(uedge, true));
edges.push_back(Parent::direct(uedge, false));
- getNotifier(Edge()).add(edges);
+ notifier(Edge()).add(edges);
return uedge;
}
void clear() {
- getNotifier(Edge()).clear();
- getNotifier(UEdge()).clear();
- getNotifier(Node()).clear();
- getNotifier(BNode()).clear();
- getNotifier(ANode()).clear();
+ notifier(Edge()).clear();
+ notifier(UEdge()).clear();
+ notifier(Node()).clear();
+ notifier(BNode()).clear();
+ notifier(ANode()).clear();
Parent::clear();
}
@@ -1321,11 +1321,11 @@
void build(const Graph& graph, ANodeRefMap& aNodeRef,
BNodeRefMap& bNodeRef, UEdgeRefMap& uEdgeRef) {
Parent::build(graph, aNodeRef, bNodeRef, uEdgeRef);
- getNotifier(ANode()).build();
- getNotifier(BNode()).build();
- getNotifier(Node()).build();
- getNotifier(UEdge()).build();
- getNotifier(Edge()).build();
+ notifier(ANode()).build();
+ notifier(BNode()).build();
+ notifier(Node()).build();
+ notifier(UEdge()).build();
+ notifier(Edge()).build();
}
void erase(const Node& node) {
@@ -1336,17 +1336,17 @@
erase(uedge);
Parent::firstFromANode(uedge, node);
}
- getNotifier(ANode()).erase(node);
+ notifier(ANode()).erase(node);
} else {
Parent::firstFromBNode(uedge, node);
while (uedge != INVALID) {
erase(uedge);
Parent::firstFromBNode(uedge, node);
}
- getNotifier(BNode()).erase(node);
+ notifier(BNode()).erase(node);
}
- getNotifier(Node()).erase(node);
+ notifier(Node()).erase(node);
Parent::erase(node);
}
@@ -1354,8 +1354,8 @@
std::vector<Edge> edges;
edges.push_back(Parent::direct(uedge, true));
edges.push_back(Parent::direct(uedge, false));
- getNotifier(Edge()).erase(edges);
- getNotifier(UEdge()).erase(uedge);
+ notifier(Edge()).erase(edges);
+ notifier(UEdge()).erase(uedge);
Parent::erase(uedge);
}
Modified: lemon/trunk/lemon/bits/map_extender.h
==============================================================================
--- lemon/trunk/lemon/bits/map_extender.h (original)
+++ lemon/trunk/lemon/bits/map_extender.h Thu Mar 1 18:14:24 2007
@@ -83,14 +83,14 @@
MapIt(Invalid i) : Parent(i) { }
explicit MapIt(Map& _map) : map(_map) {
- map.getNotifier()->first(*this);
+ map.notifier()->first(*this);
}
MapIt(const Map& _map, const Item& item)
: Parent(item), map(_map) {}
MapIt& operator++() {
- map.getNotifier()->next(*this);
+ map.notifier()->next(*this);
return *this;
}
@@ -123,14 +123,14 @@
ConstMapIt(Invalid i) : Parent(i) { }
explicit ConstMapIt(Map& _map) : map(_map) {
- map.getNotifier()->first(*this);
+ map.notifier()->first(*this);
}
ConstMapIt(const Map& _map, const Item& item)
: Parent(item), map(_map) {}
ConstMapIt& operator++() {
- map.getNotifier()->next(*this);
+ map.notifier()->next(*this);
return *this;
}
@@ -152,14 +152,14 @@
ItemIt(Invalid i) : Parent(i) { }
explicit ItemIt(Map& _map) : map(_map) {
- map.getNotifier()->first(*this);
+ map.notifier()->first(*this);
}
ItemIt(const Map& _map, const Item& item)
: Parent(item), map(_map) {}
ItemIt& operator++() {
- map.getNotifier()->next(*this);
+ map.notifier()->next(*this);
return *this;
}
Modified: lemon/trunk/lemon/bits/vector_map.h
==============================================================================
--- lemon/trunk/lemon/bits/vector_map.h (original)
+++ lemon/trunk/lemon/bits/vector_map.h Thu Mar 1 18:14:24 2007
@@ -90,8 +90,8 @@
/// It constructs a map and attachs it into the notifier.
/// It adds all the items of the graph to the map.
VectorMap(const Graph& graph) {
- Parent::attach(graph.getNotifier(Item()));
- container.resize(Parent::getNotifier()->maxId() + 1);
+ Parent::attach(graph.notifier(Item()));
+ container.resize(Parent::notifier()->maxId() + 1);
}
/// \brief Constructor uses given value to initialize the map.
@@ -99,8 +99,8 @@
/// It constructs a map uses a given value to initialize the map.
/// It adds all the items of the graph to the map.
VectorMap(const Graph& graph, const Value& value) {
- Parent::attach(graph.getNotifier(Item()));
- container.resize(Parent::getNotifier()->maxId() + 1, value);
+ Parent::attach(graph.notifier(Item()));
+ container.resize(Parent::notifier()->maxId() + 1, value);
}
/// \brief Copy constructor
@@ -108,7 +108,7 @@
/// Copy constructor.
VectorMap(const VectorMap& _copy) : Parent() {
if (_copy.attached()) {
- Parent::attach(*_copy.getNotifier());
+ Parent::attach(*_copy.notifier());
container = _copy.container;
}
}
@@ -134,7 +134,7 @@
template <typename CMap>
VectorMap& operator=(const CMap& cmap) {
checkConcept<concepts::ReadMap<Key, _Value>, 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]);
@@ -149,7 +149,7 @@
/// The subscript operator. The map can be subscripted by the
/// actual items of the graph.
Reference operator[](const Key& key) {
- return container[Parent::getNotifier()->id(key)];
+ return container[Parent::notifier()->id(key)];
}
/// \brief The const subcript operator.
@@ -157,7 +157,7 @@
/// The const subscript operator. The map can be subscripted by the
/// actual items of the graph.
ConstReference operator[](const Key& key) const {
- return container[Parent::getNotifier()->id(key)];
+ return container[Parent::notifier()->id(key)];
}
@@ -175,7 +175,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) {
- int id = Parent::getNotifier()->id(key);
+ int id = Parent::notifier()->id(key);
if (id >= (int)container.size()) {
container.resize(id + 1);
}
@@ -188,7 +188,7 @@
virtual void add(const std::vector<Key>& keys) {
int max = container.size() - 1;
for (int i = 0; i < (int)keys.size(); ++i) {
- int id = Parent::getNotifier()->id(keys[i]);
+ int id = Parent::notifier()->id(keys[i]);
if (id >= max) {
max = id;
}
@@ -201,7 +201,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) {
- container[Parent::getNotifier()->id(key)] = Value();
+ container[Parent::notifier()->id(key)] = Value();
}
/// \brief Erase more keys from the map.
@@ -210,7 +210,7 @@
/// and it overrides the erase() member function of the observer base.
virtual void erase(const std::vector<Key>& keys) {
for (int i = 0; i < (int)keys.size(); ++i) {
- container[Parent::getNotifier()->id(keys[i])] = Value();
+ container[Parent::notifier()->id(keys[i])] = Value();
}
}
@@ -219,7 +219,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() {
- int size = Parent::getNotifier()->maxId() + 1;
+ int size = Parent::notifier()->maxId() + 1;
container.reserve(size);
container.resize(size);
}
Modified: lemon/trunk/lemon/bpugraph_adaptor.h
==============================================================================
--- lemon/trunk/lemon/bpugraph_adaptor.h (original)
+++ lemon/trunk/lemon/bpugraph_adaptor.h Thu Mar 1 18:14:24 2007
@@ -169,28 +169,28 @@
int maxUEdgeId() const { return graph->maxEdgeId(); }
typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
- NodeNotifier& getNotifier(Node) const {
- return graph->getNotifier(Node());
+ NodeNotifier& notifier(Node) const {
+ return graph->notifier(Node());
}
typedef typename ItemSetTraits<Graph, ANode>::ItemNotifier ANodeNotifier;
- ANodeNotifier& getNotifier(ANode) const {
- return graph->getNotifier(ANode());
+ ANodeNotifier& notifier(ANode) const {
+ return graph->notifier(ANode());
}
typedef typename ItemSetTraits<Graph, BNode>::ItemNotifier BNodeNotifier;
- BNodeNotifier& getNotifier(BNode) const {
- return graph->getNotifier(BNode());
+ BNodeNotifier& notifier(BNode) const {
+ return graph->notifier(BNode());
}
typedef typename ItemSetTraits<Graph, Edge>::ItemNotifier EdgeNotifier;
- EdgeNotifier& getNotifier(Edge) const {
- return graph->getNotifier(Edge());
+ EdgeNotifier& notifier(Edge) const {
+ return graph->notifier(Edge());
}
typedef typename ItemSetTraits<Graph, UEdge>::ItemNotifier UEdgeNotifier;
- UEdgeNotifier& getNotifier(UEdge) const {
- return graph->getNotifier(UEdge());
+ UEdgeNotifier& notifier(UEdge) const {
+ return graph->notifier(UEdge());
}
template <typename _Value>
@@ -371,13 +371,13 @@
int bNodeNum() const { return Parent::aNodeNum(); }
typedef typename Parent::BNodeNotifier ANodeNotifier;
- ANodeNotifier& getNotifier(ANode) const {
- return Parent::getNotifier(typename Parent::BNode());
+ ANodeNotifier& notifier(ANode) const {
+ return Parent::notifier(typename Parent::BNode());
}
typedef typename Parent::ANodeNotifier BNodeNotifier;
- BNodeNotifier& getNotifier(BNode) const {
- return Parent::getNotifier(typename Parent::ANode());
+ BNodeNotifier& notifier(BNode) const {
+ return Parent::notifier(typename Parent::ANode());
}
template <typename _Value>
Modified: lemon/trunk/lemon/concepts/graph_components.h
==============================================================================
--- lemon/trunk/lemon/concepts/graph_components.h (original)
+++ lemon/trunk/lemon/concepts/graph_components.h Thu Mar 1 18:14:24 2007
@@ -1262,14 +1262,14 @@
/// \brief Gives back the node alteration notifier.
///
/// Gives back the node alteration notifier.
- NodeNotifier& getNotifier(Node) const {
+ NodeNotifier& notifier(Node) const {
return NodeNotifier();
}
/// \brief Gives back the edge alteration notifier.
///
/// Gives back the edge alteration notifier.
- EdgeNotifier& getNotifier(Edge) const {
+ EdgeNotifier& notifier(Edge) const {
return EdgeNotifier();
}
@@ -1278,10 +1278,10 @@
void constraints() {
checkConcept<Base, _Graph>();
typename _Graph::NodeNotifier& nn
- = graph.getNotifier(typename _Graph::Node());
+ = graph.notifier(typename _Graph::Node());
typename _Graph::EdgeNotifier& en
- = graph.getNotifier(typename _Graph::Edge());
+ = graph.notifier(typename _Graph::Edge());
ignore_unused_variable_warning(nn);
ignore_unused_variable_warning(en);
@@ -1316,7 +1316,7 @@
/// \brief Gives back the edge alteration notifier.
///
/// Gives back the edge alteration notifier.
- UEdgeNotifier& getNotifier(UEdge) const {
+ UEdgeNotifier& notifier(UEdge) const {
return UEdgeNotifier();
}
@@ -1325,7 +1325,7 @@
void constraints() {
checkConcept<AlterableGraphComponent<Base>, _Graph>();
typename _Graph::UEdgeNotifier& uen
- = graph.getNotifier(typename _Graph::UEdge());
+ = graph.notifier(typename _Graph::UEdge());
ignore_unused_variable_warning(uen);
}
@@ -1364,14 +1364,14 @@
/// \brief Gives back the A-node alteration notifier.
///
/// Gives back the A-node alteration notifier.
- ANodeNotifier& getNotifier(ANode) const {
+ ANodeNotifier& notifier(ANode) const {
return ANodeNotifier();
}
/// \brief Gives back the B-node alteration notifier.
///
/// Gives back the B-node alteration notifier.
- BNodeNotifier& getNotifier(BNode) const {
+ BNodeNotifier& notifier(BNode) const {
return BNodeNotifier();
}
@@ -1380,9 +1380,9 @@
void constraints() {
checkConcept<AlterableUGraphComponent<Base>, _Graph>();
typename _Graph::ANodeNotifier& ann
- = graph.getNotifier(typename _Graph::ANode());
+ = graph.notifier(typename _Graph::ANode());
typename _Graph::BNodeNotifier& bnn
- = graph.getNotifier(typename _Graph::BNode());
+ = graph.notifier(typename _Graph::BNode());
ignore_unused_variable_warning(ann);
ignore_unused_variable_warning(bnn);
}
Modified: lemon/trunk/lemon/edge_set.h
==============================================================================
--- lemon/trunk/lemon/edge_set.h (original)
+++ lemon/trunk/lemon/edge_set.h Thu Mar 1 18:14:24 2007
@@ -199,8 +199,8 @@
typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
- NodeNotifier& getNotifier(Node) const {
- return graph->getNotifier(Node());
+ NodeNotifier& notifier(Node) const {
+ return graph->notifier(Node());
}
template <typename _Value>
@@ -527,8 +527,8 @@
typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
- NodeNotifier& getNotifier(Node) const {
- return graph->getNotifier(Node());
+ NodeNotifier& notifier(Node) const {
+ return graph->notifier(Node());
}
template <typename _Value>
Modified: lemon/trunk/lemon/full_graph.h
==============================================================================
--- lemon/trunk/lemon/full_graph.h (original)
+++ lemon/trunk/lemon/full_graph.h Thu Mar 1 18:14:24 2007
@@ -194,11 +194,11 @@
/// This cause that the maps of the graph will reallocated
/// automatically and the previous values will be lost.
void resize(int n) {
- Parent::getNotifier(Edge()).clear();
- Parent::getNotifier(Node()).clear();
+ Parent::notifier(Edge()).clear();
+ Parent::notifier(Node()).clear();
construct(n);
- Parent::getNotifier(Node()).build();
- Parent::getNotifier(Edge()).build();
+ Parent::notifier(Node()).build();
+ Parent::notifier(Edge()).build();
}
/// \brief Returns the node with the given index.
@@ -406,13 +406,13 @@
/// This cause that the maps of the graph will reallocated
/// automatically and the previous values will be lost.
void resize(int n) {
- Parent::getNotifier(Edge()).clear();
- Parent::getNotifier(UEdge()).clear();
- Parent::getNotifier(Node()).clear();
+ Parent::notifier(Edge()).clear();
+ Parent::notifier(UEdge()).clear();
+ Parent::notifier(Node()).clear();
construct(n);
- Parent::getNotifier(Node()).build();
- Parent::getNotifier(UEdge()).build();
- Parent::getNotifier(Edge()).build();
+ Parent::notifier(Node()).build();
+ Parent::notifier(UEdge()).build();
+ Parent::notifier(Edge()).build();
}
/// \brief Returns the node with the given index.
@@ -703,17 +703,17 @@
///
/// Resize the graph
void resize(int n, int m) {
- Parent::getNotifier(Edge()).clear();
- Parent::getNotifier(UEdge()).clear();
- Parent::getNotifier(Node()).clear();
- Parent::getNotifier(ANode()).clear();
- Parent::getNotifier(BNode()).clear();
+ Parent::notifier(Edge()).clear();
+ Parent::notifier(UEdge()).clear();
+ Parent::notifier(Node()).clear();
+ Parent::notifier(ANode()).clear();
+ Parent::notifier(BNode()).clear();
construct(n, m);
- Parent::getNotifier(ANode()).build();
- Parent::getNotifier(BNode()).build();
- Parent::getNotifier(Node()).build();
- Parent::getNotifier(UEdge()).build();
- Parent::getNotifier(Edge()).build();
+ Parent::notifier(ANode()).build();
+ Parent::notifier(BNode()).build();
+ Parent::notifier(Node()).build();
+ Parent::notifier(UEdge()).build();
+ Parent::notifier(Edge()).build();
}
/// \brief Number of nodes.
Modified: lemon/trunk/lemon/graph_adaptor.h
==============================================================================
--- lemon/trunk/lemon/graph_adaptor.h (original)
+++ lemon/trunk/lemon/graph_adaptor.h Thu Mar 1 18:14:24 2007
@@ -132,14 +132,14 @@
typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
- NodeNotifier& getNotifier(Node) const {
- return graph->getNotifier(Node());
+ NodeNotifier& notifier(Node) const {
+ return graph->notifier(Node());
}
typedef typename ItemSetTraits<Graph, Edge>::ItemNotifier EdgeNotifier;
- EdgeNotifier& getNotifier(Edge) const {
- return graph->getNotifier(Edge());
+ EdgeNotifier& notifier(Edge) const {
+ return graph->notifier(Edge());
}
template <typename _Value>
@@ -1182,7 +1182,7 @@
void setGraph(_Graph& graph) {
Parent::setGraph(graph);
- edge_notifier_proxy.setNotifier(graph.getNotifier(GraphEdge()));
+ edge_notifier_proxy.setNotifier(graph.notifier(GraphEdge()));
}
public:
@@ -1196,11 +1196,11 @@
typedef typename Parent::EdgeNotifier UEdgeNotifier;
- using Parent::getNotifier;
+ using Parent::notifier;
typedef AlterationNotifier<AlterableUndirGraphAdaptor,
Edge> EdgeNotifier;
- EdgeNotifier& getNotifier(Edge) const { return edge_notifier; }
+ EdgeNotifier& notifier(Edge) const { return edge_notifier; }
protected:
@@ -1231,7 +1231,7 @@
std::vector<Edge> edges;
edges.push_back(AdaptorBase::Parent::direct(ge, true));
edges.push_back(AdaptorBase::Parent::direct(ge, false));
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Edge()).add(edges);
}
virtual void add(const std::vector<GraphEdge>& ge) {
std::vector<Edge> edges;
@@ -1239,13 +1239,13 @@
edges.push_back(AdaptorBase::Parent::direct(ge[i], true));
edges.push_back(AdaptorBase::Parent::direct(ge[i], false));
}
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Edge()).add(edges);
}
virtual void erase(const GraphEdge& ge) {
std::vector<Edge> edges;
edges.push_back(AdaptorBase::Parent::direct(ge, true));
edges.push_back(AdaptorBase::Parent::direct(ge, false));
- adaptor->getNotifier(Edge()).erase(edges);
+ adaptor->notifier(Edge()).erase(edges);
}
virtual void erase(const std::vector<GraphEdge>& ge) {
std::vector<Edge> edges;
@@ -1253,13 +1253,13 @@
edges.push_back(AdaptorBase::Parent::direct(ge[i], true));
edges.push_back(AdaptorBase::Parent::direct(ge[i], false));
}
- adaptor->getNotifier(Edge()).erase(edges);
+ adaptor->notifier(Edge()).erase(edges);
}
virtual void build() {
- adaptor->getNotifier(Edge()).build();
+ adaptor->notifier(Edge()).build();
}
virtual void clear() {
- adaptor->getNotifier(Edge()).clear();
+ adaptor->notifier(Edge()).clear();
}
const AdaptorBase* adaptor;
@@ -2143,7 +2143,7 @@
void setGraph(_Graph& graph) {
Parent::setGraph(graph);
- node_notifier_proxy.setNotifier(graph.getNotifier(GraphNode()));
+ node_notifier_proxy.setNotifier(graph.notifier(GraphNode()));
}
public:
@@ -2155,7 +2155,7 @@
typedef AlterationNotifier<AlterableSplitGraphAdaptor, Node> NodeNotifier;
typedef InvalidType EdgeNotifier;
- NodeNotifier& getNotifier(Node) const { return node_notifier; }
+ NodeNotifier& notifier(Node) const { return node_notifier; }
protected:
@@ -2186,7 +2186,7 @@
std::vector<Node> nodes;
nodes.push_back(AdaptorBase::Parent::inNode(gn));
nodes.push_back(AdaptorBase::Parent::outNode(gn));
- adaptor->getNotifier(Node()).add(nodes);
+ adaptor->notifier(Node()).add(nodes);
}
virtual void add(const std::vector<GraphNode>& gn) {
@@ -2195,14 +2195,14 @@
nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
}
- adaptor->getNotifier(Node()).add(nodes);
+ adaptor->notifier(Node()).add(nodes);
}
virtual void erase(const GraphNode& gn) {
std::vector<Node> nodes;
nodes.push_back(AdaptorBase::Parent::inNode(gn));
nodes.push_back(AdaptorBase::Parent::outNode(gn));
- adaptor->getNotifier(Node()).erase(nodes);
+ adaptor->notifier(Node()).erase(nodes);
}
virtual void erase(const std::vector<GraphNode>& gn) {
@@ -2211,13 +2211,13 @@
nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
}
- adaptor->getNotifier(Node()).erase(nodes);
+ adaptor->notifier(Node()).erase(nodes);
}
virtual void build() {
- adaptor->getNotifier(Node()).build();
+ adaptor->notifier(Node()).build();
}
virtual void clear() {
- adaptor->getNotifier(Node()).clear();
+ adaptor->notifier(Node()).clear();
}
const AdaptorBase* adaptor;
@@ -2255,8 +2255,8 @@
void setGraph(_Graph& graph) {
Parent::setGraph(graph);
- node_notifier_proxy.setNotifier(graph.getNotifier(GraphNode()));
- edge_notifier_proxy.setNotifier(graph.getNotifier(GraphEdge()));
+ node_notifier_proxy.setNotifier(graph.notifier(GraphNode()));
+ edge_notifier_proxy.setNotifier(graph.notifier(GraphEdge()));
}
public:
@@ -2269,8 +2269,8 @@
typedef AlterationNotifier<AlterableSplitGraphAdaptor, Node> NodeNotifier;
typedef AlterationNotifier<AlterableSplitGraphAdaptor, Edge> EdgeNotifier;
- NodeNotifier& getNotifier(Node) const { return node_notifier; }
- EdgeNotifier& getNotifier(Edge) const { return edge_notifier; }
+ NodeNotifier& notifier(Node) const { return node_notifier; }
+ EdgeNotifier& notifier(Edge) const { return edge_notifier; }
protected:
@@ -2301,8 +2301,8 @@
std::vector<Node> nodes;
nodes.push_back(AdaptorBase::Parent::inNode(gn));
nodes.push_back(AdaptorBase::Parent::outNode(gn));
- adaptor->getNotifier(Node()).add(nodes);
- adaptor->getNotifier(Edge()).add(AdaptorBase::Parent::edge(gn));
+ adaptor->notifier(Node()).add(nodes);
+ adaptor->notifier(Edge()).add(AdaptorBase::Parent::edge(gn));
}
virtual void add(const std::vector<GraphNode>& gn) {
std::vector<Node> nodes;
@@ -2312,15 +2312,15 @@
nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
}
- adaptor->getNotifier(Node()).add(nodes);
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Node()).add(nodes);
+ adaptor->notifier(Edge()).add(edges);
}
virtual void erase(const GraphNode& gn) {
- adaptor->getNotifier(Edge()).erase(AdaptorBase::Parent::edge(gn));
+ adaptor->notifier(Edge()).erase(AdaptorBase::Parent::edge(gn));
std::vector<Node> nodes;
nodes.push_back(AdaptorBase::Parent::inNode(gn));
nodes.push_back(AdaptorBase::Parent::outNode(gn));
- adaptor->getNotifier(Node()).erase(nodes);
+ adaptor->notifier(Node()).erase(nodes);
}
virtual void erase(const std::vector<GraphNode>& gn) {
std::vector<Node> nodes;
@@ -2330,28 +2330,28 @@
nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
}
- adaptor->getNotifier(Edge()).erase(edges);
- adaptor->getNotifier(Node()).erase(nodes);
+ adaptor->notifier(Edge()).erase(edges);
+ adaptor->notifier(Node()).erase(nodes);
}
virtual void build() {
std::vector<Edge> edges;
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ const typename Parent::Notifier* notifier = Parent::notifier();
GraphNode it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
edges.push_back(AdaptorBase::Parent::edge(it));
}
- adaptor->getNotifier(Node()).build();
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Node()).build();
+ adaptor->notifier(Edge()).add(edges);
}
virtual void clear() {
std::vector<Edge> edges;
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ const typename Parent::Notifier* notifier = Parent::notifier();
GraphNode it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
edges.push_back(AdaptorBase::Parent::edge(it));
}
- adaptor->getNotifier(Edge()).erase(edges);
- adaptor->getNotifier(Node()).clear();
+ adaptor->notifier(Edge()).erase(edges);
+ adaptor->notifier(Node()).clear();
}
const AdaptorBase* adaptor;
@@ -2381,42 +2381,42 @@
protected:
virtual void add(const GraphEdge& ge) {
- adaptor->getNotifier(Edge()).add(AdaptorBase::edge(ge));
+ adaptor->notifier(Edge()).add(AdaptorBase::edge(ge));
}
virtual void add(const std::vector<GraphEdge>& ge) {
std::vector<Edge> edges;
for (int i = 0; i < (int)ge.size(); ++i) {
edges.push_back(AdaptorBase::edge(ge[i]));
}
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Edge()).add(edges);
}
virtual void erase(const GraphEdge& ge) {
- adaptor->getNotifier(Edge()).erase(AdaptorBase::edge(ge));
+ adaptor->notifier(Edge()).erase(AdaptorBase::edge(ge));
}
virtual void erase(const std::vector<GraphEdge>& ge) {
std::vector<Edge> edges;
for (int i = 0; i < (int)ge.size(); ++i) {
edges.push_back(AdaptorBase::edge(ge[i]));
}
- adaptor->getNotifier(Edge()).erase(edges);
+ adaptor->notifier(Edge()).erase(edges);
}
virtual void build() {
std::vector<Edge> edges;
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ const typename Parent::Notifier* notifier = Parent::notifier();
GraphEdge it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
edges.push_back(AdaptorBase::Parent::edge(it));
}
- adaptor->getNotifier(Edge()).add(edges);
+ adaptor->notifier(Edge()).add(edges);
}
virtual void clear() {
std::vector<Edge> edges;
- const typename Parent::Notifier* notifier = Parent::getNotifier();
+ const typename Parent::Notifier* notifier = Parent::notifier();
GraphEdge it;
for (notifier->first(it); it != INVALID; notifier->next(it)) {
edges.push_back(AdaptorBase::Parent::edge(it));
}
- adaptor->getNotifier(Edge()).erase(edges);
+ adaptor->notifier(Edge()).erase(edges);
}
const AdaptorBase* adaptor;
Modified: lemon/trunk/lemon/graph_utils.h
==============================================================================
--- lemon/trunk/lemon/graph_utils.h (original)
+++ lemon/trunk/lemon/graph_utils.h Thu Mar 1 18:14:24 2007
@@ -1873,7 +1873,7 @@
/// Constructor for descriptor map.
explicit DescriptorMap(const Graph& _graph) : Map(_graph) {
Item it;
- const typename Map::Notifier* notifier = Map::getNotifier();
+ const typename Map::Notifier* notifier = Map::notifier();
for (notifier->first(it); it != INVALID; notifier->next(it)) {
Map::set(it, invMap.size());
invMap.push_back(it);
@@ -1935,7 +1935,7 @@
virtual void build() {
Map::build();
Item it;
- const typename Map::Notifier* notifier = Map::getNotifier();
+ const typename Map::Notifier* notifier = Map::notifier();
for (notifier->first(it); it != INVALID; notifier->next(it)) {
Map::set(it, invMap.size());
invMap.push_back(it);
@@ -2292,7 +2292,7 @@
///
/// Constructor for creating in-degree map.
explicit InDegMap(const Graph& _graph) : graph(_graph), deg(_graph) {
- Parent::attach(graph.getNotifier(typename _Graph::Edge()));
+ Parent::attach(graph.notifier(typename _Graph::Edge()));
for(typename _Graph::NodeIt it(graph); it != INVALID; ++it) {
deg[it] = countInEdges(graph, it);
@@ -2404,7 +2404,7 @@
///
/// Constructor for creating out-degree map.
explicit OutDegMap(const Graph& _graph) : graph(_graph), deg(_graph) {
- Parent::attach(graph.getNotifier(typename _Graph::Edge()));
+ Parent::attach(graph.notifier(typename _Graph::Edge()));
for(typename _Graph::NodeIt it(graph); it != INVALID; ++it) {
deg[it] = countOutEdges(graph, it);
Modified: lemon/trunk/lemon/grid_ugraph.h
==============================================================================
--- lemon/trunk/lemon/grid_ugraph.h (original)
+++ lemon/trunk/lemon/grid_ugraph.h Thu Mar 1 18:14:24 2007
@@ -390,13 +390,13 @@
/// \brief Resize the graph
///
void resize(int n, int m) {
- Parent::getNotifier(Edge()).clear();
- Parent::getNotifier(UEdge()).clear();
- Parent::getNotifier(Node()).clear();
+ Parent::notifier(Edge()).clear();
+ Parent::notifier(UEdge()).clear();
+ Parent::notifier(Node()).clear();
construct(n, m);
- Parent::getNotifier(Node()).build();
- Parent::getNotifier(UEdge()).build();
- Parent::getNotifier(Edge()).build();
+ Parent::notifier(Node()).build();
+ Parent::notifier(UEdge()).build();
+ Parent::notifier(Edge()).build();
}
/// \brief The node on the given position.
Modified: lemon/trunk/lemon/matrix_maps.h
==============================================================================
--- lemon/trunk/lemon/matrix_maps.h (original)
+++ lemon/trunk/lemon/matrix_maps.h Thu Mar 1 18:14:24 2007
@@ -270,7 +270,7 @@
/// Creates an item matrix for the given graph.
DynamicMatrixMap(const Graph& _graph)
: values(size(_graph.maxId(Key()) + 1)) {
- Parent::attach(_graph.getNotifier(Key()));
+ Parent::attach(_graph.notifier(Key()));
}
/// \brief Creates an item matrix for the given graph
@@ -279,7 +279,7 @@
/// pairs of keys the given parameter.
DynamicMatrixMap(const Graph& _graph, const Value& _val)
: values(size(_graph.maxId(Key()) + 1), _val) {
- Parent::attach(_graph.getNotifier(Key()));
+ Parent::attach(_graph.notifier(Key()));
}
///\brief The assignement operator.
@@ -296,7 +296,7 @@
template <typename CMap>
DynamicMatrixMap& operator=(const CMap& _cmap){
checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
- typename Parent::Notifier* notifier = Parent::getNotifier();
+ typename Parent::Notifier* notifier = Parent::notifier();
Key first, second;
for(notifier->first(first); first != INVALID;
notifier->next(first)){
@@ -313,8 +313,8 @@
///
/// Gives back the value assigned to the \c first - \c second ordered pair.
ConstReference operator()(const Key& first, const Key& second) const {
- return values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))];
+ return values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))];
}
/// \brief Gives back the value assigned to the \c first - \c second
@@ -322,16 +322,16 @@
///
/// Gives back the value assigned to the \c first - \c second ordered pair.
Reference operator()(const Key& first, const Key& second) {
- return values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))];
+ return values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))];
}
/// \brief Setter function for the matrix map.
///
/// Setter function for the matrix map.
void set(const Key& first, const Key& second, const Value& val) {
- values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))] = val;
+ values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))] = val;
}
protected:
@@ -349,16 +349,16 @@
}
virtual void add(const Key& key) {
- if (size(Parent::getNotifier()->id(key) + 1) >= (int)values.size()) {
- values.resize(size(Parent::getNotifier()->id(key) + 1));
+ if (size(Parent::notifier()->id(key) + 1) >= (int)values.size()) {
+ values.resize(size(Parent::notifier()->id(key) + 1));
}
}
virtual void add(const std::vector<Key>& keys) {
int new_size = 0;
for (int i = 0; i < (int)keys.size(); ++i) {
- if (size(Parent::getNotifier()->id(keys[i]) + 1) >= new_size) {
- new_size = size(Parent::getNotifier()->id(keys[i]) + 1);
+ if (size(Parent::notifier()->id(keys[i]) + 1) >= new_size) {
+ new_size = size(Parent::notifier()->id(keys[i]) + 1);
}
}
if (new_size > (int)values.size()) {
@@ -371,7 +371,7 @@
virtual void erase(const std::vector<Key>&) {}
virtual void build() {
- values.resize(size(Parent::getNotifier()->maxId() + 1));
+ values.resize(size(Parent::notifier()->maxId() + 1));
}
virtual void clear() {
@@ -419,7 +419,7 @@
/// Creates an item matrix for the given graph.
DynamicSymMatrixMap(const Graph& _graph)
: values(size(_graph.maxId(Key()) + 1)) {
- Parent::attach(_graph.getNotifier(Key()));
+ Parent::attach(_graph.notifier(Key()));
}
/// \brief Creates an item matrix for the given graph
@@ -428,7 +428,7 @@
/// pairs of keys the given parameter.
DynamicSymMatrixMap(const Graph& _graph, const Value& _val)
: values(size(_graph.maxId(Key()) + 1), _val) {
- Parent::attach(_graph.getNotifier(Key()));
+ Parent::attach(_graph.notifier(Key()));
}
@@ -447,7 +447,7 @@
template <typename CMap>
DynamicSymMatrixMap& operator=(const CMap& _cmap){
checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
- typename Parent::Notifier* notifier = Parent::getNotifier();
+ typename Parent::Notifier* notifier = Parent::notifier();
Key first, second;
for(notifier->first(first); first != INVALID;
notifier->next(first)){
@@ -466,8 +466,8 @@
/// Gives back the value assigned to the \c first - \c second unordered
/// pair.
ConstReference operator()(const Key& first, const Key& second) const {
- return values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))];
+ return values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))];
}
/// \brief Gives back the value assigned to the \c first - \c second
@@ -476,8 +476,8 @@
/// Gives back the value assigned to the \c first - \c second unordered
/// pair.
Reference operator()(const Key& first, const Key& second) {
- return values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))];
+ return values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))];
}
/// \brief Setter function for the matrix map.
@@ -485,8 +485,8 @@
/// Setter function for the matrix map.
///
void set(const Key& first, const Key& second, const Value& val) {
- values[index(Parent::getNotifier()->id(first),
- Parent::getNotifier()->id(second))] = val;
+ values[index(Parent::notifier()->id(first),
+ Parent::notifier()->id(second))] = val;
}
protected:
@@ -504,16 +504,16 @@
}
virtual void add(const Key& key) {
- if (size(Parent::getNotifier()->id(key) + 1) >= (int)values.size()) {
- values.resize(size(Parent::getNotifier()->id(key) + 1));
+ if (size(Parent::notifier()->id(key) + 1) >= (int)values.size()) {
+ values.resize(size(Parent::notifier()->id(key) + 1));
}
}
virtual void add(const std::vector<Key>& keys) {
int new_size = 0;
for (int i = 0; i < (int)keys.size(); ++i) {
- if (size(Parent::getNotifier()->id(keys[i]) + 1) >= new_size) {
- new_size = size(Parent::getNotifier()->id(keys[i]) + 1);
+ if (size(Parent::notifier()->id(keys[i]) + 1) >= new_size) {
+ new_size = size(Parent::notifier()->id(keys[i]) + 1);
}
}
if (new_size > (int)values.size()) {
@@ -526,7 +526,7 @@
virtual void erase(const std::vector<Key>&) {}
virtual void build() {
- values.resize(size(Parent::getNotifier()->maxId() + 1));
+ values.resize(size(Parent::notifier()->maxId() + 1));
}
virtual void clear() {
@@ -801,8 +801,8 @@
_first_key_proxy(*this),
_second_key_proxy(*this)
{
- _first_key_proxy.attach(_firstContainer.getNotifier(FirstKey()));
- _second_key_proxy.attach(_secondContainer.getNotifier(SecondKey()));
+ _first_key_proxy.attach(_firstContainer.notifier(FirstKey()));
+ _second_key_proxy.attach(_secondContainer.notifier(SecondKey()));
}
///\brief Constructor what create the map for the two containers type.
@@ -817,8 +817,8 @@
_first_key_proxy(*this),
_second_key_proxy(*this)
{
- _first_key_proxy.attach(_firstContainer.getNotifier(FirstKey()));
- _second_key_proxy.attach(_secondContainer.getNotifier(SecondKey()));
+ _first_key_proxy.attach(_firstContainer.notifier(FirstKey()));
+ _second_key_proxy.attach(_secondContainer.notifier(SecondKey()));
}
///\brief Copy constructor.
@@ -828,8 +828,8 @@
: _first_key_proxy(*this), _second_key_proxy(*this) {
if(_copy._first_key_proxy.attached() &&
_copy._second_key_proxy.attached()){
- _first_key_proxy.attach(*_copy._first_key_proxy.getNotifier());
- _second_key_proxy.attach(*_copy._second_key_proxy.getNotifier());
+ _first_key_proxy.attach(*_copy._first_key_proxy.notifier());
+ _second_key_proxy.attach(*_copy._second_key_proxy.notifier());
values = _copy.values;
}
}
@@ -854,8 +854,8 @@
///Gives back the value assigned to the \c first - \c second
///ordered pair.
Reference operator()(const FirstKey& _first, const SecondKey& _second) {
- return values[_first_key_proxy.getNotifier()->id(_first)]
- [_second_key_proxy.getNotifier()->id(_second)];
+ return values[_first_key_proxy.notifier()->id(_first)]
+ [_second_key_proxy.notifier()->id(_second)];
}
///\brief Gives back the value assigned to the \c first - \c
@@ -865,8 +865,8 @@
///ordered pair.
ConstReference operator()(const FirstKey& _first,
const SecondKey& _second) const {
- return values[_first_key_proxy.getNotifier()->id(_first)]
- [_second_key_proxy.getNotifier()->id(_second)];
+ return values[_first_key_proxy.notifier()->id(_first)]
+ [_second_key_proxy.notifier()->id(_second)];
}
///\brief Setter function for this matrix map.
@@ -874,8 +874,8 @@
///Setter function for this matrix map.
void set(const FirstKey& first, const SecondKey& second,
const Value& value){
- values[_first_key_proxy.getNotifier()->id(first)]
- [_second_key_proxy.getNotifier()->id(second)] = value;
+ values[_first_key_proxy.notifier()->id(first)]
+ [_second_key_proxy.notifier()->id(second)] = value;
}
///\brief The assignement operator.
@@ -893,9 +893,9 @@
DynamicAsymMatrixMap& operator=(const CMap& _cdmap){
checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
const typename FirstKeyProxy::Notifier* notifierFirstKey =
- _first_key_proxy.getNotifier();
+ _first_key_proxy.notifier();
const typename SecondKeyProxy::Notifier* notifierSecondKey =
- _second_key_proxy.getNotifier();
+ _second_key_proxy.notifier();
FirstKey itemFirst;
SecondKey itemSecond;
for(notifierFirstKey->first(itemFirst); itemFirst != INVALID;
@@ -916,15 +916,15 @@
///class belongs to the FirstKey type.
void addFirstKey(const FirstKey& firstKey) {
int size = (int)values.size();
- if( _first_key_proxy.getNotifier()->id(firstKey)+1 >= size ){
- values.resize(_first_key_proxy.getNotifier()->id(firstKey)+1);
+ if( _first_key_proxy.notifier()->id(firstKey)+1 >= size ){
+ values.resize(_first_key_proxy.notifier()->id(firstKey)+1);
if( (int)values[0].size() != 0 ){
int innersize = (int)values[0].size();
for(int i=size; i!=(int)values.size();++i){
(values[i]).resize(innersize);
}
- }else if(_second_key_proxy.getNotifier()->maxId() >= 0){
- int innersize = _second_key_proxy.getNotifier()->maxId();
+ }else if(_second_key_proxy.notifier()->maxId() >= 0){
+ int innersize = _second_key_proxy.notifier()->maxId();
for(int i = 0; i != (int)values.size(); ++i){
values[0].resize(innersize);
}
@@ -939,7 +939,7 @@
void addFirstKeys(const std::vector<FirstKey>& firstKeys){
int max = values.size() - 1;
for(int i=0; i != (int)firstKeys.size(); ++i){
- int id = _first_key_proxy.getNotifier()->id(firstKeys[i]);
+ int id = _first_key_proxy.notifier()->id(firstKeys[i]);
if(max < id){
max = id;
}
@@ -952,8 +952,8 @@
for(int i = size; i != (max + 1); ++i){
values[i].resize(innersize);
}
- }else if(_second_key_proxy.getNotifier()->maxId() >= 0){
- int innersize = _second_key_proxy.getNotifier()->maxId();
+ }else if(_second_key_proxy.notifier()->maxId() >= 0){
+ int innersize = _second_key_proxy.notifier()->maxId();
for(int i = 0; i != (int)values.size(); ++i){
values[i].resize(innersize);
}
@@ -969,7 +969,7 @@
if(values.size() == 0){
return;
}
- int id = _second_key_proxy.getNotifier()->id(secondKey);
+ int id = _second_key_proxy.notifier()->id(secondKey);
if(id >= (int)values[0].size()){
for(int i=0;i!=(int)values.size();++i){
values[i].resize(id+1);
@@ -987,7 +987,7 @@
}
int max = values[0].size();
for(int i = 0; i != (int)secondKeys.size(); ++i){
- int id = _second_key_proxy.getNotifier()->id(secondKeys[i]);
+ int id = _second_key_proxy.notifier()->id(secondKeys[i]);
if(max < id){
max = id;
}
@@ -1004,7 +1004,7 @@
///Erase a FirstKey from the map. It called by the observer
///class belongs to the FirstKey type.
void eraseFirstKey(const FirstKey& first) {
- int id = _first_key_proxy.getNotifier()->id(first);
+ int id = _first_key_proxy.notifier()->id(first);
for(int i = 0; i != (int)values[id].size(); ++i){
values[id][i] = Value();
}
@@ -1016,7 +1016,7 @@
///class belongs to the FirstKey type.
void eraseFirstKeys(const std::vector<FirstKey>& firstKeys) {
for(int j = 0; j != (int)firstKeys.size(); ++j){
- int id = _first_key_proxy.getNotifier()->id(firstKeys[j]);
+ int id = _first_key_proxy.notifier()->id(firstKeys[j]);
for(int i = 0; i != (int)values[id].size(); ++i){
values[id][i] = Value();
}
@@ -1031,7 +1031,7 @@
if(values.size() == 0){
return;
}
- int id = _second_key_proxy.getNotifier()->id(second);
+ int id = _second_key_proxy.notifier()->id(second);
for(int i = 0; i != (int)values.size(); ++i){
values[i][id] = Value();
}
@@ -1046,7 +1046,7 @@
return;
}
for(int j = 0; j != (int)secondKeys.size(); ++j){
- int id = _second_key_proxy.getNotifier()->id(secondKeys[j]);
+ int id = _second_key_proxy.notifier()->id(secondKeys[j]);
for(int i = 0; i != (int)values.size(); ++i){
values[i][id] = Value();
}
@@ -1058,9 +1058,9 @@
///It buildes the map. It is called by the observer class belongs
///to the FirstKey or SecondKey type.
void build() {
- values.resize(_first_key_proxy.getNotifier()->maxId());
+ values.resize(_first_key_proxy.notifier()->maxId());
for(int i=0; i!=(int)values.size(); ++i){
- values[i].resize(_second_key_proxy.getNotifier()->maxId());
+ values[i].resize(_second_key_proxy.notifier()->maxId());
}
}
More information about the Lemon-commits
mailing list