CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csDirtyAccessArray< T > Class Template Reference

An automatically growing array of objects. More...

#include <garray.h>

Inheritance diagram for csDirtyAccessArray< T >:

csArray< T > List of all members.

Public Methods

 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.

T * GetArray ()
 Get the pointer to the start of the array.

const T * GetArray () const
 Get the pointer to the start of the array.

T * GetArrayCopy ()
 Get a copy of the array.


Detailed Description

template<class T>
class csDirtyAccessArray< T >

An automatically growing array of objects.

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.

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 40 of file garray.h.


Constructor & Destructor Documentation

template<class T>
csDirtyAccessArray< T >::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 50 of file garray.h.


Member Function Documentation

template<class T>
const T* csDirtyAccessArray< T >::GetArray   const [inline]
 

Get the pointer to the start of the array.

Definition at line 76 of file garray.h.

template<class T>
T* csDirtyAccessArray< T >::GetArray   [inline]
 

Get the pointer to the start of the array.

Definition at line 67 of file garray.h.

Referenced by csTriangleMesh::GetTriangles().

template<class T>
T* csDirtyAccessArray< T >::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 89 of file garray.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18