csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler > Class Template Reference
A templated array class. More...
#include <csutil/dirtyaccessarray.h>

Public Member Functions | |
csDirtyAccessArray (size_t in_capacity=0, const CapacityHandler &ch=CapacityHandler()) | |
Initialize object to have initial capacity of in_capacity elements. | |
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 MemoryAllocator = CS::Memory::AllocatorMalloc, class CapacityHandler = csArrayCapacityDefault>
class csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler >
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 49 of file dirtyaccessarray.h.
Constructor & Destructor Documentation
csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::csDirtyAccessArray | ( | size_t | in_capacity = 0 , |
|
const CapacityHandler & | ch = CapacityHandler() | |||
) | [inline] |
Initialize object to have initial capacity of in_capacity
elements.
The storage increase depends on the specified capacity handler. The default capacity handler accepts a threshold parameter by which the storage is increased each time the upper bound is exceeded.
Definition at line 59 of file dirtyaccessarray.h.
Member Function Documentation
const T* csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::GetArray | ( | ) | const [inline] |
T* csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::GetArray | ( | ) | [inline] |
T* csDirtyAccessArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::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 87 of file dirtyaccessarray.h.
The documentation for this class was generated from the following file:
- csutil/dirtyaccessarray.h
Generated for Crystal Space 1.2.1 by doxygen 1.5.3