Open CASCADE Technology  7.8.1
Public Member Functions
NCollection_BasePointerVector Class Reference

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. More...
 
 NCollection_BasePointerVector (const NCollection_BasePointerVector &theOther)
 Copy data from another vector. More...
 
 NCollection_BasePointerVector (NCollection_BasePointerVector &&theOther) noexcept
 Move data from another vector. More...
 
 ~NCollection_BasePointerVector ()
 Destroy container. More...
 
bool IsEmpty () const
 Checks for an empty status. More...
 
size_t Size () const
 Gets used size. More...
 
size_t Capacity () const
 Gets available capacity. More...
 
void RemoveLast ()
 Erases last element, decrements size. More...
 
void Clear (const bool theReleaseMemory=false)
 Resets the size. More...
 
void ** GetArray () const
 Gets array, can be null. More...
 
void * Value (const size_t theInd) const
 Gets value by index, no acess validation. More...
 
void Append (const void *thePnt)
 Inserts new element at the end, increase size, if capacity is not enough, call resize. More...
 
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. More...
 
NCollection_BasePointerVectoroperator= (const NCollection_BasePointerVector &theOther)
 Copy vector. More...
 
NCollection_BasePointerVectoroperator= (NCollection_BasePointerVector &&theOther) noexcept
 Move vector. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

NCollection_BasePointerVector::NCollection_BasePointerVector ( )
inline

Memory allocation.

Default constructor

NCollection_BasePointerVector::NCollection_BasePointerVector ( const NCollection_BasePointerVector theOther)

Copy data from another vector.

NCollection_BasePointerVector::NCollection_BasePointerVector ( NCollection_BasePointerVector &&  theOther)
noexcept

Move data from another vector.

NCollection_BasePointerVector::~NCollection_BasePointerVector ( )
inline

Destroy container.

Member Function Documentation

void NCollection_BasePointerVector::Append ( const void *  thePnt)

Inserts new element at the end, increase size, if capacity is not enough, call resize.

size_t NCollection_BasePointerVector::Capacity ( ) const
inline

Gets available capacity.

void NCollection_BasePointerVector::Clear ( const bool  theReleaseMemory = false)
inline

Resets the size.

void** NCollection_BasePointerVector::GetArray ( ) const
inline

Gets array, can be null.

bool NCollection_BasePointerVector::IsEmpty ( ) const
inline

Checks for an empty status.

NCollection_BasePointerVector& NCollection_BasePointerVector::operator= ( const NCollection_BasePointerVector theOther)

Copy vector.

NCollection_BasePointerVector& NCollection_BasePointerVector::operator= ( NCollection_BasePointerVector &&  theOther)
noexcept

Move vector.

void NCollection_BasePointerVector::RemoveLast ( )
inline

Erases last element, decrements size.

void NCollection_BasePointerVector::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.

size_t NCollection_BasePointerVector::Size ( ) const
inline

Gets used size.

void* NCollection_BasePointerVector::Value ( const size_t  theInd) const
inline

Gets value by index, no acess validation.


The documentation for this class was generated from the following file: