Open CASCADE Technology  6.9.1
Data Structures
NCollection_BaseVector Class Reference

Class NCollection_BaseVector - base for NCollection_Vector template. More...

#include <NCollection_BaseVector.hxx>

Inheritance diagram for NCollection_BaseVector:
Inheritance graph
[legend]

Data Structures

class  Iterator
 Base class for Iterator implementation. More...
 
struct  MemBlock
 Memory allocation. More...
 

Public Member Functions

public API
void Clear ()
 Empty the vector of its objects. More...
 
void SetIncrement (const Standard_Integer aIncrement)
 Empty the vector of its objects. More...
 

Protected Member Functions

protected methods
 NCollection_BaseVector (const Handle< NCollection_BaseAllocator > &theAllocator, initMemBlocks_t theInitBlocks, const size_t theSize, const Standard_Integer theInc)
 Empty constructor. More...
 
 NCollection_BaseVector (const Handle< NCollection_BaseAllocator > &theAllocator, initMemBlocks_t theInitBlocks, const NCollection_BaseVector &theOther)
 Copy constructor. More...
 
void * expandV (const Standard_Integer theIndex)
 
void * findV (const Standard_Integer theIndex) const
 Locate the memory holding the desired value. More...
 

Block initializer

typedef void(* initMemBlocks_t) (NCollection_BaseVector &theVector, MemBlock &theBlock, const Standard_Integer theFirst, const Standard_Integer theSize)
 Allocate memory for array of memory blocks. More...
 
MemBlockallocMemBlocks (const Standard_Integer theCapacity, MemBlock *theSource=NULL, const Standard_Integer theSourceSize=0)
 Allocate memory for array of memory blocks. More...
 

Protected fields

Handle< NCollection_BaseAllocatormyAllocator
 
size_t myItemSize
 
Standard_Integer myIncrement
 
Standard_Integer myLength
 
Standard_Integer myCapacity
 
Standard_Integer myNBlocks
 
MemBlockmyData
 
initMemBlocks_t myInitBlocks
 

Detailed Description

Class NCollection_BaseVector - base for NCollection_Vector template.

Member Typedef Documentation

typedef void(* NCollection_BaseVector::initMemBlocks_t) (NCollection_BaseVector &theVector, MemBlock &theBlock, const Standard_Integer theFirst, const Standard_Integer theSize)
protected

Allocate memory for array of memory blocks.

Parameters
theCapacityNumber of memory blocks in array
theSourceOriginal array of memory blocks, will be automatically deallocated
theSourceSizeNumber of memory blocks in original array

Constructor & Destructor Documentation

NCollection_BaseVector::NCollection_BaseVector ( const Handle< NCollection_BaseAllocator > &  theAllocator,
initMemBlocks_t  theInitBlocks,
const size_t  theSize,
const Standard_Integer  theInc 
)
inlineprotected

Empty constructor.

NCollection_BaseVector::NCollection_BaseVector ( const Handle< NCollection_BaseAllocator > &  theAllocator,
initMemBlocks_t  theInitBlocks,
const NCollection_BaseVector theOther 
)
inlineprotected

Copy constructor.

Member Function Documentation

MemBlock* NCollection_BaseVector::allocMemBlocks ( const Standard_Integer  theCapacity,
MemBlock theSource = NULL,
const Standard_Integer  theSourceSize = 0 
)
protected

Allocate memory for array of memory blocks.

Parameters
theCapacityNumber of memory blocks in array
theSourceOriginal array of memory blocks, will be automatically deallocated
theSourceSizeNumber of memory blocks in original array
void NCollection_BaseVector::Clear ( )

Empty the vector of its objects.

void* NCollection_BaseVector::expandV ( const Standard_Integer  theIndex)
protected
Returns
pointer to memory where to put the new item
void* NCollection_BaseVector::findV ( const Standard_Integer  theIndex) const
inlineprotected

Locate the memory holding the desired value.

void NCollection_BaseVector::SetIncrement ( const Standard_Integer  aIncrement)
inline

Empty the vector of its objects.

Field Documentation

Handle< NCollection_BaseAllocator > NCollection_BaseVector::myAllocator
protected
Standard_Integer NCollection_BaseVector::myCapacity
protected
MemBlock* NCollection_BaseVector::myData
protected
Standard_Integer NCollection_BaseVector::myIncrement
protected
initMemBlocks_t NCollection_BaseVector::myInitBlocks
protected
size_t NCollection_BaseVector::myItemSize
protected
Standard_Integer NCollection_BaseVector::myLength
protected
Standard_Integer NCollection_BaseVector::myNBlocks
protected

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