Open CASCADE Technology 7.8.0
Public Member Functions | Protected Member Functions | Protected Attributes
NCollection_LocalArray< theItem, MAX_ARRAY_SIZE > Class Template Reference

Auxiliary class optimizing creation of array buffer (using stack allocation for small arrays). More...

#include <NCollection_LocalArray.hxx>

Public Member Functions

 NCollection_LocalArray (const size_t theSize)
 
 NCollection_LocalArray ()
 
 ~NCollection_LocalArray ()
 
void Allocate (const size_t theSize)
 
size_t Size () const
 
 operator theItem * () const
 

Protected Member Functions

void Deallocate ()
 

Protected Attributes

theItem myBuffer [MAX_ARRAY_SIZE]
 
theItem * myPtr
 
size_t mySize
 

Detailed Description

template<class theItem, Standard_Integer MAX_ARRAY_SIZE = 1024>
class NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >

Auxiliary class optimizing creation of array buffer (using stack allocation for small arrays).

Constructor & Destructor Documentation

◆ NCollection_LocalArray() [1/2]

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::NCollection_LocalArray ( const size_t  theSize)
inlineexplicit

◆ NCollection_LocalArray() [2/2]

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::NCollection_LocalArray ( )
inline

◆ ~NCollection_LocalArray()

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::~NCollection_LocalArray ( )
inline

Member Function Documentation

◆ Allocate()

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
void NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::Allocate ( const size_t  theSize)
inline

◆ Deallocate()

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
void NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::Deallocate ( )
inlineprotected

◆ operator theItem *()

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::operator theItem * ( ) const
inline

◆ Size()

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
size_t NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::Size ( ) const
inline

Field Documentation

◆ myBuffer

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
theItem NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::myBuffer[MAX_ARRAY_SIZE]
protected

◆ myPtr

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
theItem* NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::myPtr
protected

◆ mySize

template<class theItem , Standard_Integer MAX_ARRAY_SIZE = 1024>
size_t NCollection_LocalArray< theItem, MAX_ARRAY_SIZE >::mySize
protected

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