#include <IArray.h>
Public Member Functions | |
| IArray () | |
| Initializes the array (default.). | |
| IArray (const int n) | |
| Initializes the array with n elements. | |
| IArray (const IArray &a) | |
| Copies the given array. | |
| virtual | ~IArray () |
| virtual T & | operator[] (const unsigned int index) |
| Retrieves an element based on index number. | |
| virtual IArray | operator= (IArray &a) |
| Copies another array. | |
| virtual bool | operator== (IArray &a2) |
| Compares two arrays. | |
| virtual bool | operator!= (IArray &a2) |
| Compares two arrays. | |
| virtual unsigned int | size () |
| Returns the size of the array. | |
| virtual bool | empty () |
| Returns true if the array is empty. | |
| virtual void | push_back (const T &x) |
| Pushes an array element to the back of the array. | |
| virtual void | pop_back () |
| Pops an array element off of the back of the array. | |
| virtual void | clear () |
| Clears the array. | |
Protected Attributes | |
| T * | elements |
| unsigned int | allocated |
| unsigned int | used |
|
|||||||||
|
Initializes the array (default.).
|
|
||||||||||
|
Initializes the array with n elements.
|
|
||||||||||
|
Copies the given array.
|
|
|||||||||
|
Destroys the array, note that if it is an array of pointers, it is not the array class's responcibility to free memory. |
|
|||||||||
|
Clears the array.
|
|
|||||||||
|
Returns true if the array is empty.
|
|
||||||||||
|
Compares two arrays.
|
|
||||||||||
|
Copies another array.
|
|
||||||||||
|
Compares two arrays.
|
|
||||||||||
|
Retrieves an element based on index number.
|
|
|||||||||
|
Pops an array element off of the back of the array.
|
|
||||||||||
|
Pushes an array element to the back of the array.
|
|
|||||||||
|
Returns the size of the array.
|
|
|||||
|
|
|
|||||
|
|
|
|||||
|
|
1.4.2