A simple dynamic array of integers.
More...
#include <DetourAlloc.h>
|
| dtIntArray () |
| Constructs an instance with an initial array size of zero.
|
|
| dtIntArray (int n) |
|
void | resize (int n) |
|
void | push (int item) |
|
int | pop () |
|
const int & | operator[] (int i) const |
|
int & | operator[] (int i) |
|
int | size () const |
| The current size of the integer array.
|
|
int * | getData () const |
|
void | copy (const dtIntArray &src) |
|
bool | contains (int v) const |
|
A simple dynamic array of integers.
◆ dtIntArray()
AtomsUtils::dtIntArray::dtIntArray |
( |
int |
n | ) |
|
|
inline |
Constructs an instance initialized to the specified size.
- Parameters
-
[in] | n | The initial size of the integer array. |
◆ operator[]() [1/2]
int& AtomsUtils::dtIntArray::operator[] |
( |
int |
i | ) |
|
|
inline |
The value at the specified array index.
- Warning
- Does not provide overflow protection.
- Parameters
-
[in] | i | The index of the value. |
◆ operator[]() [2/2]
const int& AtomsUtils::dtIntArray::operator[] |
( |
int |
i | ) |
const |
|
inline |
The value at the specified array index.
- Warning
- Does not provide overflow protection.
- Parameters
-
[in] | i | The index of the value. |
◆ pop()
int AtomsUtils::dtIntArray::pop |
( |
| ) |
|
|
inline |
Returns the value at the end of the array and reduces the size by one.
- Returns
- The value at the end of the array.
◆ push()
void AtomsUtils::dtIntArray::push |
( |
int |
item | ) |
|
|
inline |
Push the specified integer onto the end of the array and increases the size by one.
- Parameters
-
◆ resize()
void AtomsUtils::dtIntArray::resize |
( |
int |
n | ) |
|
Specifies the new size of the integer array.
- Parameters
-
[in] | n | The new size of the integer array. |
The documentation for this class was generated from the following file:
- C:/projects/AtomsVFX/Atoms/Public/AtomsUtils/NavigationMesh/Detour/DetourAlloc.h