Merge branch 'master' into 303

Conflicts:
	contrib/extractor/System.cpp
	contrib/extractor/ad.exe
	src/game/WorldSocket.cpp
This commit is contained in:
tomrus88 2008-11-06 15:50:47 +03:00
commit 78ec66babc
78 changed files with 510 additions and 752 deletions

View file

@ -1538,80 +1538,6 @@ public:
members.append(temp[i].handle->value);
}
}
/**
C++ STL style iterator variable. See begin().
Overloads the -> (dereference) operator, so this acts like a pointer
to the current member.
*/
class Iterator {
private:
friend class AABSPTree<T>;
Iterator(const typename Table<Member, Node*>::Iterator& it) : it(it) {}
public:
inline bool operator!=(const Iterator& other) const {
return !(*this == other);
}
bool operator==(const Iterator& other) const {
return it == other.it;
}
/**
Pre increment.
*/
Iterator& operator++() {
++it;
return *this;
}
private:
/**
Post increment (slower than preincrement). Intentionally unimplemented to prevent slow code.
*/
Iterator operator++(int);/* {
Iterator old = *this;
++(*this);
return old;
}*/
public:
const T& operator*() const {
return it->key.handle->value;
}
T* operator->() const {
return &(it->key.handle->value);
}
operator T*() const {
return &(it->key.handle->value);
}
};
/**
C++ STL style iterator method. Returns the first member.
Use preincrement (++entry) to get to the next element (iteration
order is arbitrary).
Do not modify the set while iterating.
*/
Iterator begin() const {
return Iterator(memberTable.begin());
}
/**
C++ STL style iterator method. Returns one after the last iterator
element.
*/
Iterator end() const {
return Iterator(memberTable.end());
}
};
}