![]() |
Public API Reference |
#include <garray.h>
Public Methods | |
csGrowingArray (int ilimit=0, int ithreshold=0, int ishrinklimit=0) | |
Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded. More... | |
void | DeleteAll () |
Clear entire vector. More... | |
~csGrowingArray () | |
Destroy the container. More... | |
void | SetLimit (int inlimit) |
Set maximum size of array. More... | |
void | SetLength (int n) |
Set vector length to n. More... | |
int | Length () const |
Query vector length. More... | |
int | Limit () const |
Query vector limit. More... | |
T * | GetArray () |
Get the pointer to the start of the array. More... | |
const T * | GetArray () const |
Get the pointer to the start of the array. More... | |
const T & | Get (int n) const |
Get a const reference. More... | |
const T & | operator[] (int n) const |
Get a const reference. More... | |
T & | operator[] (int n) |
Get a reference. More... | |
int | Push (const T &what) |
Push a element on 'top' of vector. More... | |
int | PushSmart (const T &what) |
Push a element on 'top' of vector if it is not already there. More... | |
T | Pop () |
Pop an element from vector 'top'. More... | |
T & | Top () const |
Return the top element but don't remove it. More... | |
bool | Delete (int n) |
Delete element number 'n' from vector. More... | |
bool | Insert (int n, const T &item) |
Insert element 'Item' before element 'n'. More... |
Warning! Do NOT use this for objects that require a constructor. Do not use this for pointers. For normal pointers you should use csPArray and for reference counted pointers you should use csRefArray instead of this class.
Definition at line 35 of file garray.h.
|
Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded.
|
|
Destroy the container.
|
|
Delete element number 'n' from vector.
|
|
Clear entire vector.
Definition at line 64 of file garray.h. Referenced by csGrowingArray< Listener >::~csGrowingArray. |
|
Get a const reference.
|
|
Get the pointer to the start of the array.
|
|
Get the pointer to the start of the array.
Definition at line 125 of file garray.h. Referenced by csTriangleMesh::GetTriangles. |
|
Insert element 'Item' before element 'n'.
|
|
Query vector length.
Definition at line 113 of file garray.h. Referenced by csTriangleMesh::GetTriangleCount. |
|
Query vector limit.
|
|
Get a reference.
|
|
Get a const reference.
|
|
Pop an element from vector 'top'.
|
|
Push a element on 'top' of vector.
Definition at line 160 of file garray.h. Referenced by csGrowingArray< Listener >::PushSmart. |
|
Push a element on 'top' of vector if it is not already there.
|
|
Set vector length to n.
Definition at line 104 of file garray.h. Referenced by csGrowingArray< Listener >::Delete, csGrowingArray< Listener >::Insert, csGrowingArray< Listener >::operator[], csGrowingArray< Listener >::Pop, and csGrowingArray< Listener >::Push. |
|
Set maximum size of array.
Definition at line 94 of file garray.h. Referenced by csGrowingArray< Listener >::SetLength. |
|
Return the top element but don't remove it.
|