![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
A list that can be used to store data. More...
#include <list.h>
Public Member Functions | |
| T * | getList () |
| T * | getNext () |
| int | size () |
| void | add (T const &newData) |
| void | remove (int index) |
| void | clear () |
| Clears the list. | |
| void | insert (T const &newData, int index) |
| T & | operator[] (int index) |
A list that can be used to store data.
The methodology for iterating through a list is very similar to a range based loop syntax. To iterate through a list without copying or having to redo iterations, you should create a for loop like this:
|
inline |
Adds an element to the end of the list.
| newData | The data point to be added to the list. |
|
inline |
Gets the current head of the list for purposes of iteration.
|
inline |
Gets the next element of the list.
|
inline |
Insert an element at the specified index.
| newData | The element to be inserted. |
| index | The zero based index of the location. |
|
inline |
List access operator
| index | The zero based index of the element to be accessed. |
|
inline |
Remove an element at the specified index.
| index | The zero based index of the element to be deleted. |
|
inline |
Gets the number of elements in the list.