ansi fixes

This commit is contained in:
cxgeorge 2002-11-22 23:06:29 +00:00
parent bda142a078
commit c3ad80cf52
6 changed files with 167 additions and 167 deletions

View File

@ -72,7 +72,7 @@ INLINE ordered_vector<Key, Compare>::
// the ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
begin() {
return _vector.begin();
}
@ -84,7 +84,7 @@ begin() {
// ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
end() {
return _vector.end();
}
@ -96,7 +96,7 @@ end() {
// the ordered vector, when viewed in reverse order.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
rbegin() {
return _vector.rbegin();
}
@ -108,7 +108,7 @@ rbegin() {
// ordered vector, when viewed in reverse order.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
rend() {
return _vector.rend();
}
@ -120,7 +120,7 @@ rend() {
// the ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
begin() const {
return _vector.begin();
}
@ -132,7 +132,7 @@ begin() const {
// ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
end() const {
return _vector.end();
}
@ -144,7 +144,7 @@ end() const {
// the ordered vector, when viewed in reverse order.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
rbegin() const {
return _vector.rbegin();
}
@ -156,7 +156,7 @@ rbegin() const {
// ordered vector, when viewed in reverse order.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
rend() const {
return _vector.rend();
}
@ -167,8 +167,8 @@ rend() const {
// Description: Returns the nth element.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::REFERENCE ordered_vector<Key, Compare>::
operator [] (ordered_vector<Key, Compare>::SIZE_TYPE n) {
INLINE typename ordered_vector<Key, Compare>::REFERENCE ordered_vector<Key, Compare>::
operator [] (typename ordered_vector<Key, Compare>::SIZE_TYPE n) {
return _vector[n];
}
@ -178,8 +178,8 @@ operator [] (ordered_vector<Key, Compare>::SIZE_TYPE n) {
// Description: Returns the nth element.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_REFERENCE ordered_vector<Key, Compare>::
operator [] (ordered_vector<Key, Compare>::SIZE_TYPE n) const {
INLINE typename ordered_vector<Key, Compare>::CONST_REFERENCE ordered_vector<Key, Compare>::
operator [] (typename ordered_vector<Key, Compare>::SIZE_TYPE n) const {
return _vector[n];
}
@ -189,7 +189,7 @@ operator [] (ordered_vector<Key, Compare>::SIZE_TYPE n) const {
// Description: Returns the number of elements in the ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
size() const {
return _vector.size();
}
@ -201,7 +201,7 @@ size() const {
// possibly be stored in an ordered vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
max_size() const {
return _vector.max_size();
}
@ -309,8 +309,8 @@ operator >= (const ordered_vector<Key, Compare> &other) const {
// the insert operation has taken place.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE pair<ordered_vector<Key, Compare>::ITERATOR, bool> ordered_vector<Key, Compare>::
insert_unique(const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
INLINE typename pair<typename ordered_vector<Key, Compare>::ITERATOR, bool> ordered_vector<Key, Compare>::
insert_unique(const typename ordered_vector<Key, Compare>::VALUE_TYPE &key) {
ITERATOR position = find_insert_position(begin(), end(), key);
#ifdef NDEBUG
pair<ITERATOR, bool> bogus_result(end(), false);
@ -341,8 +341,8 @@ insert_unique(const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
// element.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_nonunique(const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_nonunique(const typename ordered_vector<Key, Compare>::VALUE_TYPE &key) {
ITERATOR position = find_insert_position(begin(), end(), key);
nassertr(position >= begin() && position <= end(), end());
@ -358,8 +358,8 @@ insert_nonunique(const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
// and returns the next sequential iterator.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
erase(ordered_vector<Key, Compare>::ITERATOR position) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
erase(typename ordered_vector<Key, Compare>::ITERATOR position) {
SIZE_TYPE count = position - begin();
_vector.erase(position);
return begin() + count;
@ -372,8 +372,8 @@ erase(ordered_vector<Key, Compare>::ITERATOR position) {
// returns the number of elements removed.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
erase(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
erase(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
pair<ITERATOR, ITERATOR> result = equal_range(key);
SIZE_TYPE count = result.second - result.first;
erase(result.first, result.second);
@ -388,8 +388,8 @@ erase(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE void ordered_vector<Key, Compare>::
erase(ordered_vector<Key, Compare>::ITERATOR first,
ordered_vector<Key, Compare>::ITERATOR last) {
erase(typename ordered_vector<Key, Compare>::ITERATOR first,
typename ordered_vector<Key, Compare>::ITERATOR last) {
_vector.erase(first, last);
}
@ -413,8 +413,8 @@ clear() {
// key, the particular iterator returned is not defined.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
return nci(r_find(begin(), end(), end(), key));
}
@ -427,8 +427,8 @@ find(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
// key, the particular iterator returned is not defined.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
find(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
find(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
return r_find(begin(), end(), end(), key);
}
@ -449,8 +449,8 @@ find(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
// !Compare(b, a), but not necessarily the converse.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find_particular(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find_particular(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
return nci(r_find_particular(begin(), end(), end(), key));
}
@ -468,8 +468,8 @@ find_particular(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
// particular iterator returned is not defined./
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
find_particular(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
find_particular(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
return r_find_particular(begin(), end(), end(), key);
}
@ -480,7 +480,7 @@ find_particular(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
// to the key that are in the vector.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
INLINE typename ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
count(const key_type &key) const {
return r_count(begin(), end(), key);
}
@ -492,8 +492,8 @@ count(const key_type &key) const {
// than key, or end() if all elements are less than key.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
lower_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
lower_bound(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
return nci(r_lower_bound(begin(), end(), key));
}
@ -504,8 +504,8 @@ lower_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
// than key, or end() if all elements are less than key.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
lower_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
lower_bound(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
return r_lower_bound(begin(), end(), key);
}
@ -517,8 +517,8 @@ lower_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
// key.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
upper_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
upper_bound(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
return nci(r_upper_bound(begin(), end(), key));
}
@ -530,8 +530,8 @@ upper_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
// key.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
upper_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
INLINE typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
upper_bound(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
return r_upper_bound(begin(), end(), key);
}
@ -541,11 +541,11 @@ upper_bound(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
// Description: Returns the pair (lower_bound(key), upper_bound(key)).
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE pair<ordered_vector<Key, Compare>::ITERATOR, ordered_vector<Key, Compare>::ITERATOR> ordered_vector<Key, Compare>::
equal_range(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
pair<ordered_vector<Key, Compare>::CONST_ITERATOR, ordered_vector<Key, Compare>::CONST_ITERATOR> result;
INLINE pair<typename ordered_vector<Key, Compare>::ITERATOR, typename ordered_vector<Key, Compare>::ITERATOR> ordered_vector<Key, Compare>::
equal_range(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
pair<typename ordered_vector<Key, Compare>::CONST_ITERATOR, typename ordered_vector<Key, Compare>::CONST_ITERATOR> result;
result = r_equal_range(begin(), end(), key);
return pair<ordered_vector<Key, Compare>::ITERATOR, ordered_vector<Key, Compare>::ITERATOR>(nci(result.first), nci(result.second));
return pair<typename ordered_vector<Key, Compare>::ITERATOR, typename ordered_vector<Key, Compare>::ITERATOR>(nci(result.first), nci(result.second));
}
////////////////////////////////////////////////////////////////////
@ -554,8 +554,8 @@ equal_range(const ordered_vector<Key, Compare>::KEY_TYPE &key) {
// Description: Returns the pair (lower_bound(key), upper_bound(key)).
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE pair<ordered_vector<Key, Compare>::CONST_ITERATOR, ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
equal_range(const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
INLINE pair<typename ordered_vector<Key, Compare>::CONST_ITERATOR, typename ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
equal_range(const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
return r_equal_range(begin(), end(), key);
}
@ -580,7 +580,7 @@ swap(ordered_vector<Key, Compare> &copy) {
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE void ordered_vector<Key, Compare>::
reserve(ordered_vector<Key, Compare>::SIZE_TYPE n) {
reserve(typename ordered_vector<Key, Compare>::SIZE_TYPE n) {
_vector.reserve(n);
}
@ -642,8 +642,8 @@ push_back(const value_type &key) {
// some of these methods.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
nci(ordered_vector<Key, Compare>::CONST_ITERATOR i) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
nci(typename ordered_vector<Key, Compare>::CONST_ITERATOR i) {
return begin() + (i - begin());
}
@ -655,10 +655,10 @@ nci(ordered_vector<Key, Compare>::CONST_ITERATOR i) {
// corresponding iterator.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find_insert_position(ordered_vector<Key, Compare>::ITERATOR first,
ordered_vector<Key, Compare>::ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) {
INLINE typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
find_insert_position(typename ordered_vector<Key, Compare>::ITERATOR first,
typename ordered_vector<Key, Compare>::ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
ITERATOR result = r_find_insert_position(first, last, key);
return result;
}
@ -705,9 +705,9 @@ operator = (const ov_set<Key, Compare> &copy) {
// Description: Maps to insert_unique().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ov_set<Key, Compare>::ITERATOR ov_set<Key, Compare>::
insert(ov_set<Key, Compare>::ITERATOR position,
const ov_set<Key, Compare>::VALUE_TYPE &key) {
typename ov_set<Key, Compare>::ITERATOR ov_set<Key, Compare>::
insert(typename ov_set<Key, Compare>::ITERATOR position,
const typename ov_set<Key, Compare>::VALUE_TYPE &key) {
return ordered_vector<Key, Compare>::insert_unique(position, key);
}
@ -717,8 +717,8 @@ insert(ov_set<Key, Compare>::ITERATOR position,
// Description: Maps to insert_unique().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE pair<ov_set<Key, Compare>::ITERATOR, bool> ov_set<Key, Compare>::
insert(const ov_set<Key, Compare>::VALUE_TYPE &key) {
INLINE pair<typename ov_set<Key, Compare>::ITERATOR, bool> ov_set<Key, Compare>::
insert(const typename ov_set<Key, Compare>::VALUE_TYPE &key) {
return ordered_vector<Key, Compare>::insert_unique(key);
}
@ -786,9 +786,9 @@ operator = (const ov_multiset<Key, Compare> &copy) {
// Description: Maps to insert_nonunique().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
insert(ov_multiset<Key, Compare>::ITERATOR position,
const ov_multiset<Key, Compare>::VALUE_TYPE &key) {
typename ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
insert(typename ov_multiset<Key, Compare>::ITERATOR position,
const typename ov_multiset<Key, Compare>::VALUE_TYPE &key) {
return ordered_vector<Key, Compare>::insert_nonunique(position, key);
}
@ -798,8 +798,8 @@ insert(ov_multiset<Key, Compare>::ITERATOR position,
// Description: Maps to insert_nonunique().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
INLINE ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
insert(const ov_multiset<Key, Compare>::VALUE_TYPE &key) {
INLINE typename ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
insert(const typename ov_multiset<Key, Compare>::VALUE_TYPE &key) {
return ordered_vector<Key, Compare>::insert_nonunique(key);
}

View File

@ -32,9 +32,9 @@
// referencing the original value is returned.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_unique(ordered_vector<Key, Compare>::ITERATOR position,
const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_unique(typename ordered_vector<Key, Compare>::ITERATOR position,
const typename ordered_vector<Key, Compare>::VALUE_TYPE &key) {
if (position != end()) {
// If we're not inserting at the end, the element we're
// inserting before should not lexicographically precede this one.
@ -78,9 +78,9 @@ insert_unique(ordered_vector<Key, Compare>::ITERATOR position,
// same key to be inserted.
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_nonunique(ordered_vector<Key, Compare>::ITERATOR position,
const ordered_vector<Key, Compare>::VALUE_TYPE &key) {
typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
insert_nonunique(typename ordered_vector<Key, Compare>::ITERATOR position,
const typename ordered_vector<Key, Compare>::VALUE_TYPE &key) {
if (position != end()) {
// If we're not inserting at the end, the element we're
// inserting before should not lexicographically precede this one.
@ -162,10 +162,10 @@ verify_list_nonunique() const {
// find_insert_position().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
r_find_insert_position(ordered_vector<Key, Compare>::ITERATOR first,
ordered_vector<Key, Compare>::ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) {
typename ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
r_find_insert_position(typename ordered_vector<Key, Compare>::ITERATOR first,
typename ordered_vector<Key, Compare>::ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) {
if (first == last) {
// The list is empty; the insert position is the last of the list.
return last;
@ -190,11 +190,11 @@ r_find_insert_position(ordered_vector<Key, Compare>::ITERATOR first,
// Description: The recursive implementation of find().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_find(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_find(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
typename ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
if (first == last) {
// The list is empty; the key is not on the list.
return not_found;
@ -223,11 +223,11 @@ r_find(ordered_vector<Key, Compare>::CONST_ITERATOR first,
// Description: The recursive implementation of find_particular().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_find_particular(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_find_particular(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
typename ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
if (first == last) {
// The list is empty; the key is not on the list.
return not_found;
@ -276,11 +276,11 @@ r_find_particular(ordered_vector<Key, Compare>::CONST_ITERATOR first,
// Description: The recursive implementation of count().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
r_count(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typedef pair<ordered_vector<Key, Compare>::CONST_ITERATOR, ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
typename ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
r_count(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typedef pair<typename ordered_vector<Key, Compare>::CONST_ITERATOR, typename ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
if (first == last) {
// The list is empty; the key is not on the list.
@ -312,10 +312,10 @@ r_count(ordered_vector<Key, Compare>::CONST_ITERATOR first,
// Description: The recursive implementation of lower_bound().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_lower_bound(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_lower_bound(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
if (first == last) {
// The list is empty; the key is not on the list.
return last;
@ -345,10 +345,10 @@ r_lower_bound(ordered_vector<Key, Compare>::CONST_ITERATOR first,
// Description: The recursive implementation of upper_bound().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_upper_bound(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typename ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
r_upper_bound(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
if (first == last) {
// The list is empty; the key is not on the list.
return last;
@ -378,11 +378,11 @@ r_upper_bound(ordered_vector<Key, Compare>::CONST_ITERATOR first,
// Description: The recursive implementation of equal_range().
////////////////////////////////////////////////////////////////////
template<class Key, class Compare>
pair<ordered_vector<Key, Compare>::CONST_ITERATOR, ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
r_equal_range(ordered_vector<Key, Compare>::CONST_ITERATOR first,
ordered_vector<Key, Compare>::CONST_ITERATOR last,
const ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typedef pair<ordered_vector<Key, Compare>::CONST_ITERATOR, ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
pair<typename ordered_vector<Key, Compare>::CONST_ITERATOR, typename ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
r_equal_range(typename ordered_vector<Key, Compare>::CONST_ITERATOR first,
typename ordered_vector<Key, Compare>::CONST_ITERATOR last,
const typename ordered_vector<Key, Compare>::KEY_TYPE &key) const {
typedef pair<typename ordered_vector<Key, Compare>::CONST_ITERATOR, typename ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
if (first == last) {
// The list is empty; the key is not on the list.

View File

@ -105,13 +105,13 @@ public:
// Be careful when using the non-const iterators that you do not
// disturb the sorted order of the vector, or that if you do, you
// call sort() when you are done.
typedef Vector::iterator ITERATOR;
typedef Vector::const_iterator CONST_ITERATOR;
typedef Vector::reverse_iterator REVERSE_ITERATOR;
typedef Vector::const_reverse_iterator CONST_REVERSE_ITERATOR;
typedef typename Vector::iterator ITERATOR;
typedef typename Vector::const_iterator CONST_ITERATOR;
typedef typename Vector::reverse_iterator REVERSE_ITERATOR;
typedef typename Vector::const_reverse_iterator CONST_REVERSE_ITERATOR;
typedef Vector::difference_type DIFFERENCE_TYPE;
typedef Vector::size_type SIZE_TYPE;
typedef typename Vector::difference_type DIFFERENCE_TYPE;
typedef typename Vector::size_type SIZE_TYPE;
// Since the #define symbols do not actually expand to the correct
// names, we have to re-typedef them so callers can reference them
@ -255,8 +255,8 @@ private:
template<class Key, class Compare = less<Key> >
class ov_set : public ordered_vector<Key, Compare> {
public:
typedef ordered_vector<Key, Compare>::ITERATOR ITERATOR;
typedef ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
typedef typename ordered_vector<Key, Compare>::ITERATOR ITERATOR;
typedef typename ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
INLINE ov_set(const Compare &compare = Compare());
INLINE ov_set(const ov_set<Key, Compare> &copy);
@ -278,8 +278,8 @@ public:
template<class Key, class Compare = less<Key> >
class ov_multiset : public ordered_vector<Key, Compare> {
public:
typedef ordered_vector<Key, Compare>::ITERATOR ITERATOR;
typedef ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
typedef typename ordered_vector<Key, Compare>::ITERATOR ITERATOR;
typedef typename ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
INLINE ov_multiset(const Compare &compare = Compare());
INLINE ov_multiset(const ov_multiset<Key, Compare> &copy);

View File

@ -315,7 +315,7 @@ PointerTo(const PointerTo<T> &copy) :
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T>::To &PointerTo<T>::
INLINE typename PointerTo<T>::To &PointerTo<T>::
operator *() const {
return *_ptr;
}
@ -326,7 +326,7 @@ operator *() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T>::To *PointerTo<T>::
INLINE typename PointerTo<T>::To *PointerTo<T>::
operator -> () const {
return _ptr;
}
@ -343,7 +343,7 @@ operator -> () const {
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T>::
operator PointerToBase<T>::To *() const {
operator typename PointerToBase<T>::To *() const {
return _ptr;
}
@ -355,7 +355,7 @@ operator PointerToBase<T>::To *() const {
// for implicit upcasts.
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T>::To *PointerTo<T>::
INLINE typename PointerTo<T>::To *PointerTo<T>::
p() const {
return _ptr;
}
@ -366,7 +366,7 @@ p() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T> &PointerTo<T>::
INLINE typename PointerTo<T> &PointerTo<T>::
operator = (To *ptr) {
reassign(ptr);
return *this;
@ -378,7 +378,7 @@ operator = (To *ptr) {
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE PointerTo<T> &PointerTo<T>::
INLINE typename PointerTo<T> &PointerTo<T>::
operator = (const PointerTo<T> &copy) {
reassign((const PointerToBase<T> &)copy);
return *this;
@ -426,7 +426,7 @@ ConstPointerTo(const ConstPointerTo<T> &copy) :
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE const ConstPointerTo<T>::To &ConstPointerTo<T>::
INLINE const typename ConstPointerTo<T>::To &ConstPointerTo<T>::
operator *() const {
return *_ptr;
}
@ -437,7 +437,7 @@ operator *() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class T>
INLINE const ConstPointerTo<T>::To *ConstPointerTo<T>::
INLINE const typename ConstPointerTo<T>::To *ConstPointerTo<T>::
operator -> () const {
return _ptr;
}
@ -453,8 +453,8 @@ operator -> () const {
// correct.
////////////////////////////////////////////////////////////////////
template<class T>
INLINE ConstPointerTo<T>::
operator const PointerToBase<T>::To *() const {
INLINE typename ConstPointerTo<T>::
operator const typename PointerToBase<T>::To *() const {
return _ptr;
}
@ -466,7 +466,7 @@ operator const PointerToBase<T>::To *() const {
// for implicit upcasts.
////////////////////////////////////////////////////////////////////
template<class T>
INLINE const ConstPointerTo<T>::To *ConstPointerTo<T>::
INLINE const typename ConstPointerTo<T>::To *ConstPointerTo<T>::
p() const {
return _ptr;
}

View File

@ -75,7 +75,7 @@ PointerToArray(const PointerToArray<Element> &copy) :
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::iterator PointerToArray<Element>::
INLINE typename PointerToArray<Element>::iterator PointerToArray<Element>::
begin() const {
if (_ptr == NULL) {
return _empty_array.begin();
@ -89,7 +89,7 @@ begin() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::iterator PointerToArray<Element>::
INLINE typename PointerToArray<Element>::iterator PointerToArray<Element>::
end() const {
if (_ptr == NULL) {
return _empty_array.begin();
@ -103,7 +103,7 @@ end() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::reverse_iterator PointerToArray<Element>::
INLINE typename PointerToArray<Element>::reverse_iterator PointerToArray<Element>::
rbegin() const {
if (_ptr == NULL) {
return _empty_array.rbegin();
@ -117,7 +117,7 @@ rbegin() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::reverse_iterator PointerToArray<Element>::
INLINE typename PointerToArray<Element>::reverse_iterator PointerToArray<Element>::
rend() const {
if (_ptr == NULL) {
return _empty_array.rbegin();
@ -131,7 +131,7 @@ rend() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::size_type PointerToArray<Element>::
INLINE typename PointerToArray<Element>::size_type PointerToArray<Element>::
size() const {
return (_ptr == NULL) ? 0 : _ptr->size();
}
@ -142,7 +142,7 @@ size() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::size_type PointerToArray<Element>::
INLINE typename PointerToArray<Element>::size_type PointerToArray<Element>::
max_size() const {
nassertd(_ptr != NULL) {
((PointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -168,7 +168,7 @@ empty() const {
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE void PointerToArray<Element>::
reserve(PointerToArray<Element>::size_type n) {
reserve(typename PointerToArray<Element>::size_type n) {
if (_ptr == NULL) {
reassign(new RefCountObj<pvector<Element> >);
}
@ -181,7 +181,7 @@ reserve(PointerToArray<Element>::size_type n) {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::size_type PointerToArray<Element>::
INLINE typename PointerToArray<Element>::size_type PointerToArray<Element>::
capacity() const {
nassertr(_ptr != NULL, 0);
return _ptr->capacity();
@ -193,7 +193,7 @@ capacity() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::reference PointerToArray<Element>::
INLINE typename PointerToArray<Element>::reference PointerToArray<Element>::
front() const {
nassertd(_ptr != NULL) {
((PointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -210,7 +210,7 @@ front() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::reference PointerToArray<Element>::
INLINE typename PointerToArray<Element>::reference PointerToArray<Element>::
back() const {
nassertd(_ptr != NULL) {
((PointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -227,7 +227,7 @@ back() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::iterator PointerToArray<Element>::
INLINE typename PointerToArray<Element>::iterator PointerToArray<Element>::
insert(iterator position, const Element &x) const {
nassertr(_ptr != NULL, position);
nassertr(position >= _ptr->begin() &&
@ -506,7 +506,7 @@ ConstPointerToArray(const ConstPointerToArray<Element> &copy) :
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::iterator ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::iterator ConstPointerToArray<Element>::
begin() const {
if (_ptr == NULL) {
return _empty_array.begin();
@ -520,7 +520,7 @@ begin() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::iterator ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::iterator ConstPointerToArray<Element>::
end() const {
if (_ptr == NULL) {
return _empty_array.begin();
@ -534,7 +534,7 @@ end() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::reverse_iterator ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::reverse_iterator ConstPointerToArray<Element>::
rbegin() const {
if (_ptr == NULL) {
return _empty_array.rbegin();
@ -548,7 +548,7 @@ rbegin() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::reverse_iterator ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::reverse_iterator ConstPointerToArray<Element>::
rend() const {
if (_ptr == NULL) {
return _empty_array.rbegin();
@ -562,7 +562,7 @@ rend() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
size() const {
return (_ptr == NULL) ? 0 : _ptr->size();
}
@ -573,7 +573,7 @@ size() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
max_size() const {
nassertd(_ptr != NULL) {
((ConstPointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -598,7 +598,7 @@ empty() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::size_type ConstPointerToArray<Element>::
capacity() const {
nassertd(_ptr != NULL) {
((ConstPointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -613,7 +613,7 @@ capacity() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
operator[](size_type n) const {
nassertd(_ptr != NULL) {
((ConstPointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -632,7 +632,7 @@ operator[](size_type n) const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
front() const {
nassertd(_ptr != NULL) {
((ConstPointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);
@ -649,7 +649,7 @@ front() const {
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
INLINE typename ConstPointerToArray<Element>::reference ConstPointerToArray<Element>::
back() const {
nassertd(_ptr != NULL) {
((ConstPointerToArray<Element> *)this)->reassign(new RefCountObj<pvector<Element> >);

View File

@ -91,15 +91,15 @@
template <class Element>
class PointerToArray : public PointerToBase<RefCountObj<pvector<Element> > > {
public:
typedef pvector<Element>::value_type value_type;
typedef pvector<Element>::reference reference;
typedef pvector<Element>::const_reference const_reference;
typedef pvector<Element>::iterator iterator;
typedef pvector<Element>::const_iterator const_iterator;
typedef pvector<Element>::reverse_iterator reverse_iterator;
typedef pvector<Element>::const_reverse_iterator const_reverse_iterator;
typedef pvector<Element>::difference_type difference_type;
typedef pvector<Element>::size_type size_type;
typedef typename pvector<Element>::value_type value_type;
typedef typename pvector<Element>::reference reference;
typedef typename pvector<Element>::const_reference const_reference;
typedef typename pvector<Element>::iterator iterator;
typedef typename pvector<Element>::const_iterator const_iterator;
typedef typename pvector<Element>::reverse_iterator reverse_iterator;
typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
typedef typename pvector<Element>::difference_type difference_type;
typedef typename pvector<Element>::size_type size_type;
PUBLISHED:
INLINE PointerToArray();
@ -116,8 +116,8 @@ public:
INLINE iterator begin() const;
INLINE iterator end() const;
INLINE PointerToArray<Element>::reverse_iterator rbegin() const;
INLINE PointerToArray<Element>::reverse_iterator rend() const;
INLINE typename PointerToArray<Element>::reverse_iterator rbegin() const;
INLINE typename PointerToArray<Element>::reverse_iterator rend() const;
// Equality and comparison operators are pointerwise for
// PointerToArrays, not elementwise as in vector.
@ -196,20 +196,20 @@ private:
template <class Element>
class ConstPointerToArray : public PointerToBase<RefCountObj<pvector<Element> > > {
public:
typedef pvector<Element>::value_type value_type;
typedef pvector<Element>::const_reference reference;
typedef pvector<Element>::const_reference const_reference;
typedef pvector<Element>::const_iterator iterator;
typedef pvector<Element>::const_iterator const_iterator;
typedef typename pvector<Element>::value_type value_type;
typedef typename pvector<Element>::const_reference reference;
typedef typename pvector<Element>::const_reference const_reference;
typedef typename pvector<Element>::const_iterator iterator;
typedef typename pvector<Element>::const_iterator const_iterator;
#ifdef WIN32_VC
// VC++ seems to break the const_reverse_iterator definition somehow.
typedef pvector<Element>::reverse_iterator reverse_iterator;
typedef typename pvector<Element>::reverse_iterator reverse_iterator;
#else
typedef pvector<Element>::const_reverse_iterator reverse_iterator;
typedef typename pvector<Element>::const_reverse_iterator reverse_iterator;
#endif
typedef pvector<Element>::const_reverse_iterator const_reverse_iterator;
typedef pvector<Element>::difference_type difference_type;
typedef pvector<Element>::size_type size_type;
typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
typedef typename pvector<Element>::difference_type difference_type;
typedef typename pvector<Element>::size_type size_type;
INLINE ConstPointerToArray();
INLINE ConstPointerToArray(const PointerToArray<Element> &copy);
@ -219,8 +219,8 @@ public:
INLINE iterator begin() const;
INLINE iterator end() const;
INLINE ConstPointerToArray<Element>::reverse_iterator rbegin() const;
INLINE ConstPointerToArray<Element>::reverse_iterator rend() const;
INLINE typename ConstPointerToArray<Element>::reverse_iterator rbegin() const;
INLINE typename ConstPointerToArray<Element>::reverse_iterator rend() const;
// Equality and comparison operators are pointerwise for
// PointerToArrays, not elementwise as in vector.