# AP4_Array< T > Class Template Reference

`#include <Ap4Array.h>`

List of all members.

## Public Member Functions
| AP4_Array ()
| AP4_Array (const T *items, AP4_Size count)
virtual | ~AP4_Array ()
AP4_Cardinal | ItemCount () const
AP4_Result | Append (const T &item)
AP4_Result | RemoveLast ()
T & | operator[] (unsigned long idx)
const T & | operator[] (unsigned long idx) const
AP4_Result | Clear ()
AP4_Result | EnsureCapacity (AP4_Cardinal count)
## Protected Attributes
AP4_Cardinal | m_AllocatedCount
AP4_Cardinal | m_ItemCount
T * | m_Items

## Detailed Description

### template<typename T>
class AP4_Array< T >

Definition at line 55 of file Ap4Array.h.

## Constructor & Destructor Documentation

template<typename T>

AP4_Array< T >::AP4_Array | ( |  | ) | `[inline]`

Definition at line 59 of file Ap4Array.h.

template<typename T>

AP4_Array< T >::AP4_Array | ( | const T * | items,
|  | AP4_Size | count |
| ) |  |  | `[inline]`

Definition at line 81 of file Ap4Array.h.

References AP4_Array< T >::m_Items.

template<typename T>

AP4_Array< T >::~AP4_Array | ( |  | ) | `[inline, virtual]`

Definition at line 95 of file Ap4Array.h.

References AP4_Array< T >::Clear(), and AP4_Array< T >::m_Items.

## Member Function Documentation

template<typename T>

AP4_Cardinal AP4_Array< T >::ItemCount | ( |  | ) | const`[inline]`

Definition at line 62 of file Ap4Array.h.

template<typename T>

AP4_Result AP4_Array< T >::Append | ( | const T & | item | ) | `[inline]`

Definition at line 166 of file Ap4Array.h.

References AP4_ARRAY_INITIAL_COUNT, AP4_SUCCESS, AP4_Array< T >::EnsureCapacity(), AP4_Array< T >::m_AllocatedCount, AP4_Array< T >::m_ItemCount, and AP4_Array< T >::m_Items.

template<typename T>

AP4_Result AP4_Array< T >::RemoveLast | ( |  | ) | `[inline]`

Definition at line 151 of file Ap4Array.h.

References AP4_ERROR_OUT_OF_RANGE, AP4_SUCCESS, AP4_Array< T >::m_ItemCount, and AP4_Array< T >::m_Items.

template<typename T>

T& AP4_Array< T >::operator[] | ( | unsigned long | idx | ) | `[inline]`

Definition at line 65 of file Ap4Array.h.

template<typename T>

const T& AP4_Array< T >::operator[] | ( | unsigned long | idx | ) | const`[inline]`

Definition at line 66 of file Ap4Array.h.

template<typename T>

AP4_Result AP4_Array< T >::Clear | ( |  | ) | `[inline]`

Definition at line 106 of file Ap4Array.h.

References AP4_SUCCESS, AP4_Array< T >::m_ItemCount, and AP4_Array< T >::m_Items.

Referenced by AP4_Array< T >::~AP4_Array().

template<typename T>

AP4_Result AP4_Array< T >::EnsureCapacity | ( | AP4_Cardinal | count | ) | `[inline]`

Definition at line 123 of file Ap4Array.h.

References AP4_ERROR_OUT_OF_MEMORY, AP4_SUCCESS, AP4_Array< T >::m_AllocatedCount, AP4_Array< T >::m_ItemCount, AP4_Array< T >::m_Items, and NULL.

Referenced by AP4_Array< T >::Append().

## Member Data Documentation

template<typename T>

AP4_Cardinal AP4_Array< T >::m_AllocatedCount`[protected]`

Definition at line 72 of file Ap4Array.h.

Referenced by AP4_Array< T >::Append(), and AP4_Array< T >::EnsureCapacity().

template<typename T>

AP4_Cardinal AP4_Array< T >::m_ItemCount`[protected]`

Definition at line 73 of file Ap4Array.h.

Referenced by AP4_Array< T >::Append(), AP4_Array< T >::Clear(), AP4_Array< T >::EnsureCapacity(), AP4_Array< AP4_SttsTableEntry >::ItemCount(), and AP4_Array< T >::RemoveLast().

template<typename T>

T* AP4_Array< T >::m_Items`[protected]`

Definition at line 74 of file Ap4Array.h.

Referenced by AP4_Array< T >::AP4_Array(), AP4_Array< T >::Append(), AP4_Array< T >::Clear(), AP4_Array< T >::EnsureCapacity(), AP4_Array< AP4_SttsTableEntry >::operator[](), AP4_Array< T >::RemoveLast(), and AP4_Array< T >::~AP4_Array().

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

- Ap4Array.h