Torque::List< Type > Class Template Reference#include <tList.h>
Detailed Description
A list template class.
|
Public Types | |
typedef PrivatePersist * | PersistentIter |
A PersistentIter is used for the special cases where you need to store an iterator for efficiency reasons. | |
typedef Type | ValueType |
typedef Type & | Reference |
typedef const Type & | ConstReference |
typedef _Iterator< Type, Link > | Iterator |
typedef _Iterator< const Type, const Link > | ConstIterator |
typedef S32 | DifferenceType |
typedef U32 | SizeType |
Public Member Functions | |
List () | |
~List () | |
List (const List &p) | |
U32 | getSize () const |
Return the number of elements. | |
void | resize (U32) |
Set the list size. | |
void | clear () |
Empty the List. | |
bool | isEmpty () const |
Node count == 0? | |
Iterator | insert (U32 index, const Type &=Type()) |
Insert new element at the given index. | |
Iterator | insert (Iterator, const Type &=Type()) |
Insert at the given iter. | |
Iterator | pushFront (const Type &=Type()) |
Insert at first element. | |
Iterator | pushBack (const Type &=Type()) |
Insert after the last element. | |
void | erase (U32) |
Preserves element order. | |
void | erase (Iterator) |
Preserves element order. | |
void | popFront () |
Remove the first element. | |
void | popBack () |
Remove the last element. | |
Iterator | begin () |
_Iterator to first element | |
ConstIterator | begin () const |
_Iterator to first element | |
Iterator | end () |
_Iterator to last element + 1 | |
ConstIterator | end () const |
_Iterator to last element + 1 | |
Iterator | rbegin () |
_Iterator to first element - 1 | |
ConstIterator | rbegin () const |
_Iterator to first element - 1 | |
Iterator | rend () |
_Iterator to last element | |
ConstIterator | rend () const |
_Iterator to last element | |
Type & | first () |
First element. | |
const Type & | first () const |
First element. | |
Type & | last () |
Last element. | |
const Type & | last () const |
Last element. | |
void | operator= (const List &p) |
Type & | operator[] (U32) |
const Type & | operator[] (U32) const |
Private Member Functions | |
Link * | _node (U32 index) const |
void | _destroy () |
Private Attributes | |
Link | _head |
U32 | _size |
Classes | |
class | _Iterator |
struct | Link |
struct | Node |
struct | PrivatePersist |
typedef PrivatePersist* Torque::List< Type >::PersistentIter |
A PersistentIter is used for the special cases where you need to store an iterator for efficiency reasons.
The _Iterator class handles the conversion to/from PersistentIter.
typedef Type Torque::List< Type >::ValueType |
typedef Type& Torque::List< Type >::Reference |
typedef const Type& Torque::List< Type >::ConstReference |
typedef _Iterator<Type,Link> Torque::List< Type >::Iterator |
typedef _Iterator<const Type,const Link> Torque::List< Type >::ConstIterator |
typedef S32 Torque::List< Type >::DifferenceType |
typedef U32 Torque::List< Type >::SizeType |
Torque::List< Type >::List | ( | ) |
Torque::List< Type >::~List | ( | ) |
Torque::List< Type >::List | ( | const List< Type > & | p | ) |
U32 Torque::List< Type >::getSize | ( | ) | const [inline] |
Return the number of elements.
void Torque::List< Type >::resize | ( | U32 | ) |
Set the list size.
void Torque::List< Type >::clear | ( | ) |
Empty the List.
bool Torque::List< Type >::isEmpty | ( | ) | const [inline] |
Node count == 0?
List< Type >::Iterator Torque::List< Type >::insert | ( | U32 | index, | |
const Type & | = Type() | |||
) | [inline] |
Insert new element at the given index.
List< Type >::Iterator Torque::List< Type >::insert | ( | Iterator | , | |
const Type & | = Type() | |||
) |
Insert at the given iter.
List< Type >::Iterator Torque::List< Type >::pushFront | ( | const Type & | = Type() |
) | [inline] |
Insert at first element.
List< Type >::Iterator Torque::List< Type >::pushBack | ( | const Type & | = Type() |
) | [inline] |
Insert after the last element.
void Torque::List< Type >::erase | ( | U32 | ) | [inline] |
Preserves element order.
void Torque::List< Type >::erase | ( | Iterator | ) |
Preserves element order.
void Torque::List< Type >::popFront | ( | ) | [inline] |
Remove the first element.
void Torque::List< Type >::popBack | ( | ) | [inline] |
Remove the last element.
List< Type >::Iterator Torque::List< Type >::begin | ( | ) | [inline] |
_Iterator to first element
List< Type >::ConstIterator Torque::List< Type >::begin | ( | ) | const [inline] |
_Iterator to first element
List< Type >::Iterator Torque::List< Type >::end | ( | ) | [inline] |
_Iterator to last element + 1
List< Type >::ConstIterator Torque::List< Type >::end | ( | ) | const [inline] |
_Iterator to last element + 1
List< Type >::Iterator Torque::List< Type >::rbegin | ( | ) | [inline] |
_Iterator to first element - 1
List< Type >::ConstIterator Torque::List< Type >::rbegin | ( | ) | const [inline] |
_Iterator to first element - 1
List< Type >::Iterator Torque::List< Type >::rend | ( | ) | [inline] |
_Iterator to last element
List< Type >::ConstIterator Torque::List< Type >::rend | ( | ) | const [inline] |
_Iterator to last element
Type & Torque::List< Type >::first | ( | ) | [inline] |
First element.
const Type & Torque::List< Type >::first | ( | ) | const [inline] |
First element.
Type & Torque::List< Type >::last | ( | ) | [inline] |
Last element.
const Type & Torque::List< Type >::last | ( | ) | const [inline] |
Last element.
void Torque::List< Type >::operator= | ( | const List< Type > & | p | ) |
Type & Torque::List< Type >::operator[] | ( | U32 | ) | [inline] |
const Type & Torque::List< Type >::operator[] | ( | U32 | ) | const [inline] |
List< Type >::Link * Torque::List< Type >::_node | ( | U32 | index | ) | const [private] |
void Torque::List< Type >::_destroy | ( | ) | [private] |
Link Torque::List< Type >::_head [private] |
U32 Torque::List< Type >::_size [private] |