OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKernel
NCollection


NCollection_SparseArrayBase::Block Class Reference


Public Types

typedef unsigned char Cell
 type of items used to hold bits

Public Member Functions

 Block (const Standard_Address theAddr, const Standard_Size theNbItems, const Standard_Size theItemSize)
 Initializes the block by pointer to block data.
Cell Set (Standard_Size i)
 Set bit for i-th item; returns non-null if that bit has not been set previously.
Cell IsSet (Standard_Size i)
 Check bit for i-th item; returns non-null if that bit is set.
Cell Unset (Standard_Size i)
 Unset bit for i-th item; returns non-null if that bit has been set previously.

Static Public Member Functions

static Standard_Size BitsPerCell ()
 Number of bits in each cell.
static Standard_Size Size (const Standard_Size theNbItems, const Standard_Size theItemSize)
 Compute required size for block data, in bytes.
static char * ToArray (const Standard_Address theAddress, const Standard_Size, const Standard_Size)
 Returns address of array from address of block.

Data Fields

Standard_SizeCount
 items counter
Standard_Address Array
 pointer to the data items array
CellBits
 bit map for defined/undefined flags

Detailed Description

The block of data contains array of items, counter and bit field, allocated as single piece of memory addressed from the blocks array (myData).

The Block structure provides a logical view on the block, and provides methods to work with bit map.

Note that NCollection_SparseArrayBase class takes responsibility for correct allocation/deallocation of all the data.


Member Typedef Documentation

typedef unsigned char NCollection_SparseArrayBase::Block::Cell
 


Constructor & Destructor Documentation

NCollection_SparseArrayBase::Block::Block const Standard_Address  theAddr,
const Standard_Size  theNbItems,
const Standard_Size  theItemSize
[inline]
 


Member Function Documentation

static Standard_Size NCollection_SparseArrayBase::Block::BitsPerCell  )  [inline, static]
 

Cell NCollection_SparseArrayBase::Block::IsSet Standard_Size  i  )  [inline]
 

Cell NCollection_SparseArrayBase::Block::Set Standard_Size  i  )  [inline]
 

static Standard_Size NCollection_SparseArrayBase::Block::Size const Standard_Size  theNbItems,
const Standard_Size  theItemSize
[inline, static]
 

static char* NCollection_SparseArrayBase::Block::ToArray const Standard_Address  theAddress,
const   Standard_Size,
const   Standard_Size
[inline, static]
 

Cell NCollection_SparseArrayBase::Block::Unset Standard_Size  i  )  [inline]
 


Field Documentation

Standard_Address NCollection_SparseArrayBase::Block::Array
 

Cell* NCollection_SparseArrayBase::Block::Bits
 

Standard_Size* NCollection_SparseArrayBase::Block::Count
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:13:01 2008 for OpenCASCADE by  doxygen 1.4.1