Open CASCADE Technology 7.8.0
|
Simplified class for vector of pointers of void. Offers basic functionality to scalable inserts, resizes and erasing last. More...
#include <NCollection_BasePointerVector.hxx>
Public Member Functions | |
NCollection_BasePointerVector () | |
Memory allocation. | |
NCollection_BasePointerVector (const NCollection_BasePointerVector &theOther) | |
Copy data from another vector. | |
NCollection_BasePointerVector (NCollection_BasePointerVector &&theOther) noexcept | |
Move data from another vector. | |
~NCollection_BasePointerVector () | |
Destroy container. | |
bool | IsEmpty () const |
Checks for an empty status. | |
size_t | Size () const |
Gets used size. | |
size_t | Capacity () const |
Gets available capacity. | |
void | RemoveLast () |
Erases last element, decrements size. | |
void | Clear (const bool theReleaseMemory=false) |
Resets the size. | |
void ** | GetArray () const |
Gets array, can be null. | |
void * | Value (const size_t theInd) const |
Gets value by index, no acess validation. | |
void | Append (const void *thePnt) |
Inserts new element at the end, increase size, if capacity is not enough, call resize. | |
void | SetValue (const size_t theInd, const void *thePnt) |
Updates value of existed element, If index more then size, increase size of container, in this case capacity can be updated. | |
NCollection_BasePointerVector & | operator= (const NCollection_BasePointerVector &theOther) |
Copy vector. | |
NCollection_BasePointerVector & | operator= (NCollection_BasePointerVector &&theOther) noexcept |
Move vector. | |
Simplified class for vector of pointers of void. Offers basic functionality to scalable inserts, resizes and erasing last.
Control of processing values of pointers out-of-scope and should be controlled externally. Especially, copy operation should post-process elements of pointers to make deep copy.
|
inline |
Memory allocation.
Default constructor
NCollection_BasePointerVector::NCollection_BasePointerVector | ( | const NCollection_BasePointerVector & | theOther | ) |
Copy data from another vector.
|
noexcept |
Move data from another vector.
|
inline |
Destroy container.
void NCollection_BasePointerVector::Append | ( | const void * | thePnt | ) |
Inserts new element at the end, increase size, if capacity is not enough, call resize.
|
inline |
Gets available capacity.
Resets the size.
|
inline |
Gets array, can be null.
|
inline |
Checks for an empty status.
NCollection_BasePointerVector & NCollection_BasePointerVector::operator= | ( | const NCollection_BasePointerVector & | theOther | ) |
Copy vector.
|
noexcept |
Move vector.
|
inline |
Erases last element, decrements size.
Updates value of existed element, If index more then size, increase size of container, in this case capacity can be updated.
|
inline |
Gets used size.
Gets value by index, no acess validation.