Collection<type> class public functions


No description available.

Collection(int arraySize);
No description available.

Collection(int arraySize, type *aCollection);
No description available.

Collection(Collection<type>& aCollection);
No description available.

Removes the array from the heap.

void allowGrowth(int status = 1);
When status is true, then trying to access the next highest element which isn't in the array will cause the array to grow; otherwise, accessing the next highest element will result in a fatal error.

void append(type& element);
Adds the element to the end of the array, grow if allocation size is same size as array.

void append(type element);
Same as append above, but for use with r-values.

void append(type* element);
Same as append above, but for use with r-values.

type* getBase(void);
No description available.

long getAllocSize(void) const;
Returns the allocation size of the array. The free space left in the array is this amount minus the number returned by getSize().

long getSize(void) const;
returns the size of the array (not the allocated size which may be greater).

type* pointer(void);
No description available.

void setAllocSize(long aSize);
No description available.

void setGrowth(long growth);
Sets the element increment to grow by when it is necessary to grow.

void setSize(long newSize);
sets the size of the collection (not the allocated size). If the size is greated then the allocated size, then the array will grow so that allocated size equals element size.

type& operator[](int arrayIndex);
Access the indexth element of the collection.

type operator[](int arrayIndex) const;
No description available.

void grow(long growamt = -1);
Increase the allocation size of the collection. If growamt is -1, then grow by the preset growth amount.