5#ifndef __IRR_LIST_H_INCLUDED__
6#define __IRR_LIST_H_INCLUDED__
27 SKListNode(
const T&
e) : Next(0), Prev(0), Element(
e) {}
52 while (num-- && this->Current != 0) ++(*this);
56 while(num++ && this->Current != 0) --(*this);
70 #if defined (_MSC_VER) && (_MSC_VER < 1300)
71 #pragma warning(disable:4284)
103 while(num-- && this->Current != 0) ++(*this);
107 while(num++ && this->Current != 0) --(*this);
132 friend class list<
T>;
137 : First(0), Last(0), Size(0) {}
191 SKListNode *
next = First->Next;
313 node->Next =
it.Current->Next;
315 if (
it.Current->Next)
316 it.Current->Next->Prev =
node;
322 if (
it.Current == Last)
337 node->Prev =
it.Current->Prev;
339 if (
it.Current->Prev)
340 it.Current->Prev->Next =
node;
346 if (
it.Current == First)
362 if(
it.Current == First)
364 First =
it.Current->Next;
368 it.Current->Prev->Next =
it.Current->Next;
371 if(
it.Current == Last)
373 Last =
it.Current->Prev;
377 it.Current->Next->Prev =
it.Current->Prev;
Axis aligned bounding box in 3d dimensional space.
void construct(T *ptr, const T &e)
Construct an element.
void destruct(T *ptr)
Destruct an element.
void deallocate(T *ptr)
Deallocate memory for an array of objects.
T * allocate(size_t cnt)
Allocate memory for an array of objects.
List iterator for const access.
ConstIterator & operator++()
ConstIterator & operator-=(s32 num)
ConstIterator & operator--()
bool operator!=(const ConstIterator &other) const
ConstIterator & operator=(const Iterator &iterator)
ConstIterator operator-(s32 num) const
bool operator==(const ConstIterator &other) const
ConstIterator & operator+=(s32 num)
ConstIterator operator+(s32 num) const
ConstIterator(const Iterator &iter)
Iterator operator+(s32 num) const
bool operator==(const Iterator &other) const
Iterator & operator-=(s32 num)
Iterator operator-(s32 num) const
bool operator!=(const Iterator &other) const
Iterator & operator+=(s32 num)
Doubly linked list template.
void push_back(const T &element)
Adds an element at the end of the list.
list(const list< T > &other)
Copy constructor.
void insert_before(const Iterator &it, const T &element)
Inserts an element before an element.
u32 size() const
Returns amount of elements in list.
Iterator erase(Iterator &it)
Erases an element.
void operator=(const list< T > &other)
Assignment operator.
ConstIterator end() const
Gets end node.
Iterator getLast()
Gets last element.
ConstIterator getLast() const
Gets last element.
void swap(list< T > &other)
Swap the content of this list container with the content of another list.
ConstIterator begin() const
Gets first node.
bool empty() const
Checks for empty list.
void insert_after(const Iterator &it, const T &element)
Inserts an element after an element.
list()
Default constructor for empty list.
Iterator end()
Gets end node.
void clear()
Clears the list, deletes all elements in the list.
Iterator begin()
Gets first node.
void push_front(const T &element)
Adds an element at the begin of the list.
void swap(T1 &a, T2 &b)
swaps the content of the passed parameters
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
signed int s32
32 bit signed variable.