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