Go to the documentation of this file.
20 #ifndef __OpenKarto_List_h__
21 #define __OpenKarto_List_h__
111 virtual void Add(
const T& rValue)
171 message.
Append(
"Cannot remove item: invalid index: ");
252 return (*
this)[index];
262 return (*
this)[index];
270 inline T*
Find(
const T& rValue)
338 T* pElements =
new T[newSize];
343 for (
kt_size_t i = 0; i < smallerSize; i++)
365 if (newCapacity > oldSize)
395 else if (comparison < 0)
535 throw Exception(
"Cannot create iterator: List is NULL");
554 if (m_Index < m_pList->Size())
560 throw Exception(
"Cannot increment iterator: No more items in iterator.");
569 if (m_Index < m_pList->Size())
574 throw Exception(
"Cannot dereference iterator: No more items in iterator.");
583 if (m_Index < m_pList->Size())
588 throw Exception(
"Cannot dereference iterator: No more items in iterator.");
628 throw Exception(
"Iterators are not operating on the same list");
660 throw Exception(
"Cannot create iterator: List is NULL");
679 if (m_Index < m_pList->Size())
685 throw Exception(
"Cannot increment iterator: No more items in iterator.");
693 if (m_Index < m_pList->Size())
698 throw Exception(
"Cannot erase item: No more items in iterator.");
707 if (m_Index < m_pList->Size())
712 throw Exception(
"Cannot dereference iterator: No more items in iterator.");
721 if (m_Index < m_pList->Size())
726 throw Exception(
"Cannot dereference iterator: No more items in iterator.");
766 throw Exception(
"Iterators are not operating on the same list");
780 #endif // __OpenKarto_List_h__
virtual T operator++(int)
virtual T * operator->() const
ConstListIterator< T > ConstIterator
virtual const T & operator++()
const T & Minimum(const T &value1, const T &value2)
void Append(const String &rString)
virtual kt_bool HasNext() const
void EnsureCapacity(kt_size_t newCapacity)
kt_bool operator==(const List &rOther) const
virtual kt_size_t Size() const
virtual void Resize(kt_size_t newSize)
virtual const T * operator->() const
virtual const T & Front() const
virtual kt_bool operator!=(const ConstListIterator &rOther) const
List & operator=(const List &rOther)
virtual void RemoveAt(kt_size_t index)
virtual const T & Get(kt_size_t index) const
virtual kt_bool Contains(const T &rValue) const
static String ToString(const char *value)
ConstListIterator(const List< T > *pList)
virtual ConstListIterator< T > GetConstIterator() const
ListIterator(List< T > *pList)
virtual kt_bool IsEmpty() const
kt_int32s BinarySearch(const T &rValue, kt_int32s(*f)(const T &a, const T &b))
virtual void Add(const List &rValue)
T * Find(const T &rValue)
virtual T & Get(kt_size_t index)
virtual kt_bool Remove(const T &rValue)
virtual const T & operator*() const
virtual const ConstListIterator & operator=(const ConstListIterator &rOther)
virtual T operator++(int)
const List< T > * m_pList
virtual void Add(const T &rValue)
virtual const T & Back() const
const T & operator[](kt_size_t index) const
T & operator[](kt_size_t index)
void Set(kt_size_t index, const T &rValue)
virtual const ListIterator & operator=(const ListIterator &rOther)
virtual kt_bool HasNext() const
virtual kt_bool operator!=(const ListIterator &rOther) const
virtual const T & operator++()
virtual T & operator*() const
ListIterator< T > Iterator
virtual ListIterator< T > GetIterator()
nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Wed Mar 2 2022 00:37:22