#include <List.h>
Public Types | |
typedef ConstListIterator< T > | ConstIterator |
typedef ListIterator< T > | Iterator |
Public Member Functions | |
virtual void | Add (const T &rValue) |
virtual void | Add (const List &rValue) |
virtual const T & | Back () const |
kt_int32s | BinarySearch (const T &rValue, kt_int32s(*f)(const T &a, const T &b)) |
virtual void | Clear () |
virtual kt_bool | Contains (const T &rValue) const |
void | EnsureCapacity (kt_size_t newCapacity) |
T * | Find (const T &rValue) |
virtual const T & | Front () const |
virtual T & | Get (kt_size_t index) |
virtual const T & | Get (kt_size_t index) const |
virtual ConstListIterator< T > | GetConstIterator () const |
virtual ListIterator< T > | GetIterator () |
virtual kt_bool | IsEmpty () const |
List () | |
List (kt_size_t size) | |
List (const List &rOther) | |
List & | operator= (const List &rOther) |
kt_bool | operator== (const List &rOther) const |
T & | operator[] (kt_size_t index) |
const T & | operator[] (kt_size_t index) const |
virtual kt_bool | Remove (const T &rValue) |
virtual void | RemoveAt (kt_size_t index) |
virtual void | Resize (kt_size_t newSize) |
void | Set (kt_size_t index, const T &rValue) |
virtual kt_size_t | Size () const |
virtual | ~List () |
Private Member Functions | |
void | Reset () |
Private Attributes | |
kt_size_t | m_Capacity |
T * | m_pElements |
kt_size_t | m_Size |
List class with boundary check. Any class that is used with List MUST implement operator==. Implementation notes: Do NOT use memcpy/memset (does not work with smart pointers)
typedef ConstListIterator<T> karto::List< T >::ConstIterator |
typedef ListIterator<T> karto::List< T >::Iterator |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
Searches for value in list using given comparator f. Elements must be in sorted order for this function to work properly.
rValue | value to search for |
f | comparator takes two elements; returns 0 if the elements are equal, a value less than 0 if the first value is less than the second value, and a value greater than 0 if the first value is greater than the second value |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprivate |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
private |
|
private |
|
private |