PbArrayOfLong Class Reference
DTEXT Dynamic array of int32_t .
More...
#include <MeshViz/misc/PbArrayOfLong.h>
List of all members.
Detailed Description
DTEXT Dynamic array of int32_t .
ingroup MeshMisc DESCRIPTION It provides methods and operators for insertion and retrieval of int32_t values. It automatically resizes itself when necessary.
Constructor & Destructor Documentation
PbArrayOfLong::PbArrayOfLong |
( |
|
) |
[inline] |
PbArrayOfLong::PbArrayOfLong |
( |
int |
init_size, |
|
|
int |
extend = 10 | |
|
) |
| | |
When the array resizes itself, the extension is a multiple of extend.
PbArrayOfLong::PbArrayOfLong |
( |
const PbArrayOfLong & |
other_array |
) |
|
PbArrayOfLong::~PbArrayOfLong |
( |
|
) |
|
Member Function Documentation
int PbArrayOfLong::add |
( |
int |
num_val, |
|
|
const int32_t * |
val | |
|
) |
| | |
Inserts a list of int32_t values at the end of the array.
Returns the location of the last one inserted.
int PbArrayOfLong::add |
( |
int32_t |
val |
) |
[inline] |
Inserts int32_t value at the end of the array.
Returns its location in the array.
void PbArrayOfLong::decreasingSort |
( |
|
) |
|
Sorts array by decreasing order.
void PbArrayOfLong::empty |
( |
|
) |
[inline] |
After empty, the array appears like no int32_t value has been previously inserted.
int PbArrayOfLong::find |
( |
int32_t |
val |
) |
const [inline] |
Finds the first index in the array of a given int32_t value (-1 if not found).
int32_t PbArrayOfLong::get |
( |
int |
index |
) |
const [inline] |
Gets the int32_t value at a particular index.
const int32_t * PbArrayOfLong::get |
( |
|
) |
const [inline] |
Gets the adress of the internal array.
int PbArrayOfLong::getCapacity |
( |
|
) |
const [inline] |
Gets the allocated size of the array.
int PbArrayOfLong::getNum |
( |
|
) |
const [inline] |
Gets the number of values in the array.
void PbArrayOfLong::increasingSort |
( |
|
) |
|
Sorts array by increasing order.
void PbArrayOfLong::operator+= |
( |
int32_t |
val |
) |
[inline] |
Adds val at the end of the array.
void PbArrayOfLong::operator+= |
( |
const PbArrayOfLong & |
other_array |
) |
|
Appends other_array to the end of the array.
const int32_t & PbArrayOfLong::operator[] |
( |
int |
index |
) |
const [inline] |
int32_t & PbArrayOfLong::operator[] |
( |
int |
index |
) |
[inline] |
void PbArrayOfLong::set |
( |
int |
index, |
|
|
int32_t |
val | |
|
) |
| | [inline] |
Inserts int32_t value at a specified position in the array.
void PbArrayOfLong::setCapacity |
( |
int |
capacity, |
|
|
int |
extend | |
|
) |
| | |
set the capacity and allocate this capacity if necessary
void PbArrayOfLong::squeeze |
( |
|
) |
|
Friends And Related Function Documentation
Inequality comparison operator.
Equality comparison operator.
The documentation for this class was generated from the following file: