# FdoArray< T > Class Template Reference

`#include <Array.h>`

List of all members.

## Detailed Description

### template<typename T>
class FdoArray< T >

Abstract template class for defining dynamic arrays.

WARNING: This array uses a single memory allocation to store array elements and may re-allocate that memory when the array size needs to change. Therefore, do not keep pointers to array elements and avoid using for objects which cannot be safely moved around in memory or which have non-empty destructors.

Definition at line 68 of file Array.h.

## Public Member Functions
FdoInt32 | AddRef ()
| Increase the reference count.
void | Clear ()
| Removes all items from the array.
FdoInt32 | GetCount () const
| Gets the number of items in the array.
const T * | GetData () const
| Get a pointer to the data in the array.
T * | GetData ()
| Get a pointer to the data in the array.
FdoInt32 | GetRefCount ()
| Retrieves the reference count.
T & | operator[] (int i)
| Provide index operator [] access to array members.
const T & | operator[] (int i) const
| Provide index operator [] access to array members.
FdoInt32 | Release ()
| Decrease the reference count.
## Static Public Member Functions
static FdoArray< T > * | Append (FdoArray< T > *array, T element)
| Adds the specified item to the end of the array. Returns a new array pointer.
static FdoArray< T > * | Append (FdoArray< T > *array, FdoInt32 numElements, T *elements)
| Adds the specified array of items to the end of the array. Returns a new array pointer.
static FdoArray< T > * | Create (const T *elements, FdoInt32 initialNumElements)
| Create a dynamic array from a pointer to a fixed array.
static FdoArray< T > * | Create (FdoInt32 initialAlloc)
| Create a dynamic array preallocated to a specific size.
static FdoArray< T > * | Create ()
| Create an empty array.
static FdoArray< T > * | SetSize (FdoArray< T > *array, FdoInt32 numElements)
| Resize the array.
## Protected Member Functions
void | Dispose ()
| the rest of FdoIDisposable
| FdoArray ()
| Constructor.
T & | GetValue (FdoInt32 i)
const T & | GetValue (FdoInt32 i) const
| Access elements.
void | SetValue (FdoInt32 i, T newElement)
## Static Protected Member Functions
static FdoArray< T > * | AllocMore (FdoArray< T > *array, FdoInt32 atLeastThisMuch, bool exactly)
static FdoArray< T > * | SetAlloc (FdoArray< T > *array, FdoInt32 numElements)

The documentation for this class was generated from the following file:

- Array.h