| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csDirtyAccessArray< T, ElementHandler > Class Template Reference

A templated array class. More...

`#include <csutil/dirtyaccessarray.h>`

Inheritance diagram for csDirtyAccessArray< T, ElementHandler >:

[legend]
List of all members.

## Public Member Functions
| csDirtyAccessArray (int ilimit=0, int ithreshold=0)
| Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded.
const T * | GetArray () const
| Get the pointer to the start of the array.
T * | GetArray ()
| Get the pointer to the start of the array.
T * | GetArrayCopy ()
| Get a copy of the array.

## Detailed Description

### template<class T, class ElementHandler = csArrayElementHandler<T>>
class csDirtyAccessArray< T, ElementHandler >

A templated array class.

The only difference with csArray is that this class allows you to get the address of the internal array. This is of course dangerous so use of this class should be restricted and avoided.

The main use of this class is when you absolutely need access to the internal array that is in this class. This can be useful if you want to access some external module (like OpenGL).

Definition at line 46 of file dirtyaccessarray.h.

## Constructor & Destructor Documentation

template<class T, class ElementHandler = csArrayElementHandler<T>>

csDirtyAccessArray< T, ElementHandler >::csDirtyAccessArray | ( | int | ilimit = `0`,
|  | int | ithreshold = `0` |
| ) |  |  | `[inline]`

Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded.

Definition at line 53 of file dirtyaccessarray.h.

## Member Function Documentation

template<class T, class ElementHandler = csArrayElementHandler<T>>

const T* csDirtyAccessArray< T, ElementHandler >::GetArray | ( |  | ) | const`[inline]`

Get the pointer to the start of the array.

Definition at line 66 of file dirtyaccessarray.h.

template<class T, class ElementHandler = csArrayElementHandler<T>>

T* csDirtyAccessArray< T, ElementHandler >::GetArray | ( |  | ) | `[inline]`

Get the pointer to the start of the array.

Definition at line 57 of file dirtyaccessarray.h.

template<class T, class ElementHandler = csArrayElementHandler<T>>

T* csDirtyAccessArray< T, ElementHandler >::GetArrayCopy | ( |  | ) | `[inline]`

Get a copy of the array.

The caller is responsible for deleting this with 'delete[]'. Returns 0 if there are no items in the array.

Definition at line 79 of file dirtyaccessarray.h.

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

- csutil/dirtyaccessarray.h