An array reuse object for cases where arrays of some fixed type and size are required by the application over and over.
More...
|
| ArrayReuse () |
|
| ArrayReuse (int alngth, int acnt) |
|
| ArrayReuse (int alngth, int iacnt, int acnt) |
|
| ArrayReuse (int alngth, int iacnt, int acnt, int rsrvstr, int rsrvrefstr) |
|
virtual | ~ArrayReuse () |
|
T * | getArray () |
|
void | reuseArray (T *a) |
|
void | reset () |
|
void | resetIfRequired () |
|
void | initialize (int alngth, int acnt) |
|
void | initialize (int alngth, int iacnt, int acnt) |
|
void | initialize (int alngth, int iacnt, int acnt, int rsrvstr, int rsrvrefstr) |
|
int | getAllocatedArrays () const |
|
int | getUsedArrayCount () const |
|
int | getUnusedArrayCount () const |
|
int | getArrayLength () const |
|
template<typename T>
class geotess::ArrayReuse< T >
An array reuse object for cases where arrays of some fixed type and size are required by the application over and over.
An array reuse object for cases where arrays of some fixed type and size are required by the application over and over but it is desirable to avoid the constant allocation, and subsequent deletion, of many small arrays.
Definition at line 72 of file ArrayReuse.h.
Standard constructor where alngth is the size of the arrays to be provided to requesting clients, iacnt is the initial number of arrays to create for used by clients, and acnt is the subsequent array count allocation used when getArray() is called but no more arrays are available, rsrvstr is the capacity of the permanent store (store), and rsrvrefstr is the capacity of the reuseable reference store (refStore).
- Parameters
-
alngth | The size of the arrays to be provided to requesting clients. |
iacnt | The initial number of arrays to create for use by clients. |
acnt | The subsequent array count allocation used when getArray() is called but no more arrays are available |
rsrvstr | The capacity of the permanent store (store). |
rsrvrefstr | The capacity of the reuseable reference store (refStore). |
Definition at line 210 of file ArrayReuse.h.
Initializes sizes where alngth is the size of the arrays to be provided to requesting clients, iacnt is the initial number of arrays to create for used by clients, and acnt is the subsequent array count allocation used when getArray() is called but no more arrays are available, rsrvstr is the capacity of the permanent store (store), and rsrvrefstr is the capacity of the reuseable reference store (refStore).
- Parameters
-
alngth | The size of the arrays to be provided to requesting clients. |
iacnt | The initial number of arrays to create for use by clients. |
acnt | The subsequent array count allocation used when getArray() is called but no more arrays are available |
Definition at line 308 of file ArrayReuse.h.
template<typename T >
void geotess::ArrayReuse< T >::initialize |
( |
int |
alngth, |
|
|
int |
iacnt, |
|
|
int |
acnt, |
|
|
int |
rsrvstr, |
|
|
int |
rsrvrefstr |
|
) |
| |
|
inline |
Initializes sizes where alngth is the size of the arrays to be provided to requesting clients, iacnt is the initial number of arrays to create for used by clients, and acnt is the subsequent array count allocation used when getArray() is called but no more arrays are available, rsrvstr is the capacity of the permanent store (store), and rsrvrefstr is the capacity of the reuseable reference store (refStore).
- Parameters
-
alngth | The size of the arrays to be provided to requesting clients. |
iacnt | The initial number of arrays to create for use by clients. |
acnt | The subsequent array count allocation used when getArray() is called but no more arrays are available |
rsrvstr | The capacity of the permanent store (store). |
rsrvrefstr | The capacity of the reuseable reference store (refStore). |
Definition at line 333 of file ArrayReuse.h.