#include <RList.hxx>
Public Member Functions | |
| RList () | |
| RList (const RUInt newCapacity) | |
| ~RList () | |
| T | getElement (const RUInt elementNumber) const |
| const RUInt | getSize () const |
| const RBool | isEmpty () const |
| const RUInt | getCapacity () const |
| const RStatus | clear () |
| const RStatus | setSize (const RUInt newSize) |
| const RStatus | setCapacity (const RUInt newCapacity) |
| const RUInt | getFreeElements () const |
| const RUInt | addElement (T newElement) |
| T & | operator[] (const RUInt n) |
| T & | operator[] (const RUInt n) const |
| const RStatus | pack (const RUInt freeElements=0) |
| void | iterate (T(*iterationFunction)(const RUInt elementNumber, T inputValue)) |
| void | readOnlyIterate (void(*iterationFunction)(const RUInt elementNumber, T inputValue)) |
Private Attributes | |
| T * | _data |
| the pointer containing the data | |
| RUInt | _size |
| the current size | |
| RUInt | _capacity |
| the current capacity | |
|
|||||||||
|
creates an empty RList with NO capacity |
|
||||||||||
|
creates an empty RList with a given capacity |
|
|||||||||
|
destructor |
|
||||||||||
|
adds an element at the end of the list |
|
|||||||||
|
clears the list |
|
|||||||||
|
returns the capacity of the list |
|
||||||||||
|
returns the n-the element in the list |
|
|||||||||
|
return the number of elements that can be inserted without resizing |
|
|||||||||
|
returns the number of elements in the list |
|
|||||||||
|
returns the number of elements in the list |
|
||||||||||
|
|
|
||||||||||
|
operate to access the n-th element |
|
||||||||||
|
operate to access the n-th element |
|
||||||||||
|
set the capacity to the current size of the list This will remove space for adding new elements. It's for calling after you know the list does not change anymore and you want a optimal memory use! The optional freeElements parameter specifices how many free elements should be kept. (Default 0) |
|
||||||||||
|
|
|
||||||||||
|
changes the capacity of the list, is there are more elements in the list than the new capacity they will be deleted |
|
||||||||||
|
changes the capacity and the size to the given value if the given value is bigger than the current size the value is undifined of the enrties bigger than the current size |
|
|||||
|
the current capacity
|
|
|||||
|
the pointer containing the data
|
|
|||||
|
the current size
|
1.3.9.1