csPDelArray< T > Class Template Reference
An array of pointers. More...
#include <csutil/parray.h>
Inheritance diagram for csPDelArray< T >:
Public Member Functions | |
csPDelArray (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 * | Extract (size_t n) |
Extract element number 'n' from vector. | |
T * | GetAndClear (size_t n) |
Get and clear the element 'n' from vector. | |
T * | Pop () |
Pop an element from tail end of array. | |
void | SetLength (size_t n) |
Call csArray<T*>::SetLength(n). | |
void | SetLength (size_t n, T *const &w) |
Call csArray<T*>::SetLength(n, w). | |
void | SetLength (size_t n, T const &what) |
Variant of SetLength() which copies the pointed-to object instead of the actual pointer. |
Detailed Description
template<class T>
class csPDelArray< T >
An array of pointers.
No ref counting is done on the elements in this array. Use csRefArray if you want ref counting to happen. This array will delete elements (using 'delete') as needed. This array properly initializes new elements in the array to 0 (the NULL pointer).
Definition at line 64 of file parray.h.
Constructor & Destructor Documentation
csPDelArray< T >::csPDelArray | ( | int | ilimit = 0 , |
|
int | ithreshold = 0 | |||
) | [inline] |
Member Function Documentation
T* csPDelArray< T >::Extract | ( | size_t | n | ) | [inline] |
T* csPDelArray< T >::GetAndClear | ( | size_t | n | ) | [inline] |
Get and clear the element 'n' from vector.
This spot in the array will be set to 0. You are responsible for deleting the returned pointer later.
Definition at line 85 of file parray.h.
Referenced by csPDelArray< csRenderMeshList::renderMeshListInfo >::Extract(), and csPDelArray< csRenderMeshList::renderMeshListInfo >::Pop().
T* csPDelArray< T >::Pop | ( | ) | [inline] |
Pop an element from tail end of array.
Reimplemented from csArray< T *, csPDelArrayElementHandler< T * > >.
void csPDelArray< T >::SetLength | ( | size_t | n | ) | [inline] |
Call csArray<T*>::SetLength(n).
Reimplemented from csArray< T *, csPDelArrayElementHandler< T * > >.
void csPDelArray< T >::SetLength | ( | size_t | n, | |
T *const & | w | |||
) | [inline] |
Call csArray<T*>::SetLength(n, w).
Reimplemented from csArray< T *, csPDelArrayElementHandler< T * > >.
void csPDelArray< T >::SetLength | ( | size_t | n, | |
T const & | what | |||
) | [inline] |
Variant of SetLength() which copies the pointed-to object instead of the actual pointer.
The documentation for this class was generated from the following file:
- csutil/parray.h
Generated for Crystal Space by doxygen 1.4.7