Open CASCADE Technology 7.8.2.dev
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.
 
 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 access 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_BasePointerVectoroperator= (const NCollection_BasePointerVector &theOther)
 Copy vector.
 
NCollection_BasePointerVectoroperator= (NCollection_BasePointerVector &&theOther) noexcept
 Move vector.
 

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() [1/3]

NCollection_BasePointerVector::NCollection_BasePointerVector ( )
inline

Memory allocation.

Default constructor

◆ NCollection_BasePointerVector() [2/3]

NCollection_BasePointerVector::NCollection_BasePointerVector ( const NCollection_BasePointerVector & theOther)

Copy data from another vector.

◆ NCollection_BasePointerVector() [3/3]

NCollection_BasePointerVector::NCollection_BasePointerVector ( NCollection_BasePointerVector && theOther)
noexcept

Move data from another vector.

◆ ~NCollection_BasePointerVector()

NCollection_BasePointerVector::~NCollection_BasePointerVector ( )
inline

Destroy container.

Member Function Documentation

◆ Append()

void NCollection_BasePointerVector::Append ( const void * thePnt)

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

◆ Capacity()

size_t NCollection_BasePointerVector::Capacity ( ) const
inline

Gets available capacity.

◆ Clear()

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

Resets the size.

◆ GetArray()

void ** NCollection_BasePointerVector::GetArray ( ) const
inline

Gets array, can be null.

◆ IsEmpty()

bool NCollection_BasePointerVector::IsEmpty ( ) const
inline

Checks for an empty status.

◆ operator=() [1/2]

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

Copy vector.

◆ operator=() [2/2]

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

Move vector.

◆ RemoveLast()

void NCollection_BasePointerVector::RemoveLast ( )
inline

Erases last element, decrements size.

◆ SetValue()

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()

size_t NCollection_BasePointerVector::Size ( ) const
inline

Gets used size.

◆ Value()

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

Gets value by index, no access validation.


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