Open CASCADE Technology 6.6.0
Data Structures
NCollection_BaseVector Class Reference

Class NCollection_BaseVector - base for NCollection_Vector template.

#include <NCollection_BaseVector.hxx>

Inheritance diagram for NCollection_BaseVector:
Inheritance graph
[legend]

Data Structures

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

Public Member Functions

public API
void Clear ()
 Empty the vector of its objects.

Protected Member Functions

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

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.
static MemBlockallocMemBlocks (Handle< NCollection_BaseAllocator > &theAllocator, const Standard_Integer theCapacity, MemBlock *theSource=NULL, const Standard_Integer theSourceSize=0)
 Allocate memory for array of memory blocks.

Private fields

size_t myItemSize
Standard_Integer myIncrement
Standard_Integer myLength
Standard_Integer myCapacity
Standard_Integer myNBlocks
MemBlockmyData
initMemBlocks_t myInitBlocks

Member Typedef Documentation

typedef void(* NCollection_BaseVector::initMemBlocks_t)(NCollection_BaseVector &theVector, MemBlock &theBlock, const Standard_Integer theFirst, const Standard_Integer theSize) [protected]
Parameters:
theAllocatorMemory allocator to use
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 ( Handle< NCollection_BaseAllocator > &  theAllocator,
initMemBlocks_t  theInitBlocks,
const size_t  theSize,
const Standard_Integer  theInc 
) [inline, protected]
NCollection_BaseVector::NCollection_BaseVector ( Handle< NCollection_BaseAllocator > &  theAllocator,
initMemBlocks_t  theInitBlocks,
const NCollection_BaseVector theOther 
) [inline, protected]

Member Function Documentation

static MemBlock* NCollection_BaseVector::allocMemBlocks ( Handle< NCollection_BaseAllocator > &  theAllocator,
const Standard_Integer  theCapacity,
MemBlock theSource = NULL,
const Standard_Integer  theSourceSize = 0 
) [static, protected]
Parameters:
theAllocatorMemory allocator to use
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 ( )
void* NCollection_BaseVector::expandV ( Handle< NCollection_BaseAllocator > &  theAllocator,
const Standard_Integer  theIndex 
) [protected]
Returns:
pointer to memory where to put the new item
void* NCollection_BaseVector::findV ( const Standard_Integer  theIndex) const [inline, protected]

Field Documentation


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines