#include <RmArray.h>
Public Member Functions | |
| RmArray () | |
| Constructor. | |
| RmArray (const RmArray< Type > &src) | |
| Constructor. | |
| ~RmArray () | |
| Desstructor. | |
| int | size () const |
| Size of array. | |
| bool | empty () const |
| int | capacity () const |
| bool | reserve (int reserveSize) |
| Reserve memory. | |
| bool | resize (int newSize) |
| Resize size of array. | |
| bool | clear () |
| Destroy allocated memory. | |
| bool | push_back (Type data) |
| Add new item to end of array. | |
| bool | push_front (Type data) |
| Add new item to front. | |
| bool | remove (Type data) |
| Remove data. | |
| iterator | erase (iterator &itr) |
| Remove item by iterator. | |
| iterator | begin () |
| Begin iterator. | |
| const_iterator | begin () const |
| Begin iterator. | |
| iterator | end () |
| End iterator. | |
| const_iterator | end () const |
| End iterator. | |
| operator Type * () | |
| Access array as C style array. | |
| operator const Type * () const | |
| Access array as C style array. | |
| Type & | operator[] (int nIndex) |
| Access item by index. | |
| const Type & | operator[] (int nIndex) const |
| Access item by index. | |
| void | operator= (const RmArray< Type > &src) |
| Copy array. | |
| void | SetIncrementSize (int size) |
| Set increment size. | |
| int | GetIncrementSize () const |
| Get increment size. | |
To define the class:
RmArray< TYPE > myArray
To define an iterator to use with the class:
RmArray< TYPE >::iterator myArrayIterator;
|
|||||||||
|
Constructor. Constructor |
|
||||||||||
|
Constructor. Copy Constructor
|
|
|||||||||
|
Desstructor. Destructor |
|
|||||||||
|
Begin iterator. Returns an iterator initializes to the beginning of the array
|
|
|||||||||
|
Begin iterator. Returns an iterator initializes to the beginning of the array
|
|
|||||||||
|
\ breif Get capacity Returns array's maximum reserved data
|
|
|||||||||
|
Destroy allocated memory. Clears the entire array, and frees any allocated memory
|
|
|||||||||
|
\ breif Empty check Returns true of the array has 0 elements, false otherwise
|
|
|||||||||
|
End iterator. Returns a const iterator initializes to the end of the array
|
|
|||||||||
|
End iterator. Returns an iterator initializes to the beginning of the array
|
|
||||||||||
|
Remove item by iterator. Removes the item pointed to by the iterator itr from the array
|
|
|||||||||
|
Get increment size. Return increment size
|
|
|||||||||
|
Access array as C style array. Returns a pointer to the type array data
|
|
|||||||||
|
Access array as C style array. Returns a pointer to the type array data
|
|
||||||||||
|
Copy array. Copy Operator
|
|
||||||||||
|
Access item by index. Returns the array item at index
|
|
||||||||||
|
Access item by index. Returns the array item at index
|
|
||||||||||
|
Add new item to end of array. Add an item to the back of the array
|
|
||||||||||
|
Add new item to front. Add an item to the front of the array
|
|
||||||||||
|
Remove data. Removes a specific item from the array
|
|
||||||||||
|
Reserve memory. Reserve memory enough to store reserveSize items so that each push_back will not have to reallocate memory until reserveSize items is reached.
|
|
||||||||||
|
Resize size of array. Adjusts the size of the array
|
|
||||||||||
|
Set increment size. How much more to re-allocate when we have to resize array
|
|
|||||||||
|
Size of array. Returns the number of elements in the array None |
1.3.6