Apparently invoking non-static member functions for default arguments doesn't work. Removed the default argument for Find() and added respective additional versions. Some more minor changes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3754 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-06-30 01:00:23 +00:00
parent b3cb5e6061
commit bd3ed7497a

View File

@ -88,9 +88,10 @@ public:
inline Value &ElementAt(int32 index); inline Value &ElementAt(int32 index);
int32 IndexOf(const Value &value, int32 start = 0) const; int32 IndexOf(const Value &value, int32 start = 0) const;
Iterator Find(const Value &value, const Iterator &start = Begin()); Iterator Find(const Value &value);
ConstIterator Find(const Value &value, Iterator Find(const Value &value, const Iterator &start);
const ConstIterator &start = Begin()) const; ConstIterator Find(const Value &value) const;
ConstIterator Find(const Value &value, const ConstIterator &start) const;
inline Value &operator[](int32 index); inline Value &operator[](int32 index);
inline const Value &operator[](int32 index) const; inline const Value &operator[](int32 index) const;
@ -431,7 +432,7 @@ _VECTOR_CLASS_NAME::IsEmpty() const
} }
// MakeEmpty // MakeEmpty
/*! \brief Removes all elements of the vector. /*! \brief Removes all elements from the vector.
*/ */
_VECTOR_TEMPLATE_LIST _VECTOR_TEMPLATE_LIST
void void
@ -474,38 +475,6 @@ _VECTOR_CLASS_NAME::Begin() const
return ConstIterator(fItems); return ConstIterator(fItems);
} }
// Null
/*! \brief Returns an invalid iterator.
Null() is used as a return value, if something went wrong. It must
neither be incremented or decremented nor dereferenced!
\return An invalid iterator.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::Iterator
_VECTOR_CLASS_NAME::Null()
{
return Iterator(NULL);
}
// Null
/*! \brief Returns an invalid iterator.
Null() is used as a return value, if something went wrong. It must
neither be incremented or decremented nor dereferenced!
\return An invalid iterator.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::ConstIterator
_VECTOR_CLASS_NAME::Null() const
{
return ConstIterator(NULL);
}
// End // End
/*! \brief Returns an iterator referring to the end of the vector. /*! \brief Returns an iterator referring to the end of the vector.
@ -538,6 +507,38 @@ _VECTOR_CLASS_NAME::End() const
return ConstIterator(fItems + fItemCount); return ConstIterator(fItems + fItemCount);
} }
// Null
/*! \brief Returns an invalid iterator.
Null() is used as a return value, if something went wrong. It must
neither be incremented or decremented nor dereferenced!
\return An invalid iterator.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::Iterator
_VECTOR_CLASS_NAME::Null()
{
return Iterator(NULL);
}
// Null
/*! \brief Returns an invalid iterator.
Null() is used as a return value, if something went wrong. It must
neither be incremented or decremented nor dereferenced!
\return An invalid iterator.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::ConstIterator
_VECTOR_CLASS_NAME::Null() const
{
return ConstIterator(NULL);
}
// IteratorForIndex // IteratorForIndex
/*! \brief Returns an iterator for a given index. /*! \brief Returns an iterator for a given index.
\return An iterator referring to the same element as \a index, or \return An iterator referring to the same element as \a index, or
@ -623,7 +624,22 @@ _VECTOR_CLASS_NAME::IndexOf(const Value &value, int32 start) const
} }
// Find // Find
/*! \brief Returns an iterator referring to the of the next element with the /*! \brief Returns an iterator referring to the next element with the
specified value.
\param value The value of the element to be found.
\return An iterator referring to the found element, or End(), if no
further with the given value could be found.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::Iterator
_VECTOR_CLASS_NAME::Find(const Value &value)
{
return Find(value, Begin());
}
// Find
/*! \brief Returns an iterator referring to the next element with the
specified value. specified value.
\param value The value of the element to be found. \param value The value of the element to be found.
\param start And iterator specifying where to start searching for the \param start And iterator specifying where to start searching for the
@ -642,6 +658,21 @@ _VECTOR_CLASS_NAME::Find(const Value &value, const Iterator &start)
return End(); return End();
} }
// Find
/*! \brief Returns an iterator referring to the of the next element with the
specified value.
\param value The value of the element to be found.
\return An iterator referring to the found element, or End(), if no
further with the given value could be found.
*/
_VECTOR_TEMPLATE_LIST
inline
_VECTOR_CLASS_NAME::ConstIterator
_VECTOR_CLASS_NAME::Find(const Value &value) const
{
return Find(value, Begin());
}
// Find // Find
/*! \brief Returns an iterator referring to the of the next element with the /*! \brief Returns an iterator referring to the of the next element with the
specified value. specified value.