|
| | TArray ()=default |
| | The default class constructor.
|
| | TArray (array_size_type size) |
| | The class constructor with an initial size.
|
| | TArray (const TArray< T, TAlloc > &rhs) |
| | The copy constructor.
|
| | ~TArray () |
| | The class destructor.
|
| void | add (const T &newValue) |
| | A new item will be added to the array.
|
| void | add (const T *newValues, array_size_type numItems) |
| | An array of new items will be added to the array.
|
| void | remove (array_size_type index) |
| | Removes an item at the given index.
|
| void | remove (Iterator it) |
| | Removes the item describes by a given iterator.
|
| void | removeBack () |
| | The last item will be removed.
|
| void | set (const T &value) |
| | Will set all items to the value.
|
| void | destroy (array_size_type index) |
| | The item at the given index will be destroyed, the destructor will be called manually.
|
| T & | front () |
| | Returns the first item.
|
| T & | back () |
| | Returns the last item.
|
| const T & | back () const |
| | Returns the last item as a const reference.
|
| void | move (array_size_type startIdx, array_size_type endIdx) |
| | Moves the items from the start- to the end-index.
|
| void | reserve (array_size_type capacity) |
| | Ensures, that the capacity of the array is big enough for the given size.
|
| void | resize (array_size_type size) |
| | Resize the array, new items will be created.
|
| void | resize (array_size_type size, T val) |
| | Resize the array, new items will be created.
|
| size_t | size () const |
| | The current size of the array will be returned.
|
| size_t | capacity () const |
| | The current capacity will be returned.
|
| bool | isEmpty () const |
| | Returns true, if the array is empty.
|
| Iterator | linearSearch (const T &item) |
| | Performs a linear search for a given item in the array.
|
| void | clear () |
| | The array will be cleared, destructor of the items will be called.
|
| Iterator | begin () |
| | Returns an iterator showing to the first item.
|
| Iterator | end () |
| | Returns an iterator showing to the end of the array.
|
| T * | data () const |
| | Will return the data pointer.
|
| T & | operator[] (array_size_type idx) const |
| | The [] operator.
|
| TArray< T, TAlloc > & | operator= (const TArray< T, TAlloc > &rhs) |
| | The assignment operator.
|
| bool | operator== (const TArray< T, TAlloc > &rOther) const |
| | The compare operator.
|
template<class T, class TAlloc = TDefaultAllocator<T>>
class cppcore::TArray< T, TAlloc >
This template class implements a simple array with dynamic boundaries.
You can use it to add new items, remove them and iterate through them. The data items are stores in an array.
Definition at line 55 of file TArray.h.