# WOK
TKWOK
WOKTools

# WOKTools_BasicMap Class Reference

Root class of all the maps, provides utilitites
for managing the buckets.
.

`#include <WOKTools_BasicMap.hxx>`

Inheritance diagram for WOKTools_BasicMap:

[legend]

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_Integer | NbBuckets () const
| Returns the number of buckets in <me>. .
Standard_Integer | Extent () const
| Returns the number of keys already stored in <me>. .
Standard_Boolean | IsEmpty () const
| Returns True when the map contains no keys. This is exactly Extent() == 0. .
Standard_EXPORT void | Statistics (Standard_OStream &S) const
| Prints on <s> usefull statistics about the map <me>. It can be used to test the quality of the hashcoding. .

## Protected Member Functions

Standard_EXPORT | WOKTools_BasicMap (const Standard_Integer NbBuckets, const Standard_Boolean single)
| Initialize the map. Single is True when the map uses only one table of buckets. One table : Map, DataMap Two tables : DoubleMap, IndexedMap, IndexedDataMap .
Standard_EXPORT Standard_Boolean | BeginResize (const Standard_Integer NbBuckets, Standard_Integer &NewBuckets, Standard_Address &data1, Standard_Address &data2) const
| Tries to resize the Map with NbBuckets. Returns True if possible, NewBuckts is the new nuber of buckets. data1 and data2 are the new tables of buckets where the data must be copied. .
Standard_EXPORT void | EndResize (const Standard_Integer NbBuckets, const Standard_Integer NewBuckets, const Standard_Address data1, const Standard_Address data2)
| If BeginResize was succesfull after copying the data to data1 and data2 this methods update the tables and destroys the old ones. .
Standard_Boolean | Resizable () const
| Returns True if resizing the map should be considered. .
void | Increment ()
| Decrement the extent of the map. .
void | Decrement ()
| Decrement the extent of the map. .
Standard_Integer | Index (const Standard_Integer ahascode, const Standard_Integer NbBuckets) const
Standard_EXPORT void | Destroy ()
| Destroys the buckets. .

## Protected Attributes

Standard_Address | myData1
Standard_Address | myData2

## Private Attributes

Standard_Boolean | isDouble
Standard_Boolean | mySaturated
Standard_Integer | myNbBuckets
Standard_Integer | mySize

## Constructor & Destructor Documentation

Standard_EXPORT WOKTools_BasicMap::WOKTools_BasicMap | ( | const Standard_Integer | NbBuckets,
|  | const Standard_Boolean | single
| ) | `[protected]`

## Member Function Documentation

Standard_EXPORT Standard_Boolean WOKTools_BasicMap::BeginResize | ( | const Standard_Integer | NbBuckets,
|  | Standard_Integer & | NewBuckets,
|  | Standard_Address & | data1,
|  | Standard_Address & | data2
| ) | const`[protected]`

void WOKTools_BasicMap::Decrement | ( |  | ) | `[inline, protected]`

Standard_EXPORT void WOKTools_BasicMap::Destroy | ( |  | ) | `[protected]`

Standard_EXPORT void WOKTools_BasicMap::EndResize | ( | const Standard_Integer | NbBuckets,
|  | const Standard_Integer | NewBuckets,
|  | const Standard_Address | data1,
|  | const Standard_Address | data2
| ) | `[protected]`

Standard_Integer WOKTools_BasicMap::Extent | ( |  | ) | const`[inline]`

void WOKTools_BasicMap::Increment | ( |  | ) | `[inline, protected]`

Standard_Integer WOKTools_BasicMap::Index | ( | const Standard_Integer | ahascode,
|  | const Standard_Integer | NbBuckets
| ) | const`[inline, protected]`

Standard_Boolean WOKTools_BasicMap::IsEmpty | ( |  | ) | const`[inline]`

Standard_Integer WOKTools_BasicMap::NbBuckets | ( |  | ) | const`[inline]`

void WOKTools_BasicMap::operator delete | ( | void * | anAddress | ) | `[inline]`

Reimplemented in MS_MapOfGlobalEntity, MS_MapOfMethod, MS_MapOfType, WOKBuilder_DataMapOfHAsciiStringOfMSEntity, WOKBuilder_DataMapOfHAsciiStringOfToolInShell, WOKBuilder_DataMapOfMSActionIDOfMSAction, WOKBuilder_MapOfMSAction, WOKDeliv_DataMapOfFiles, WOKDeliv_DataMapOfParcel, WOKernel_DataMapOfFileType, WOKernel_DataMapOfFileTypeBase, WOKernel_DataMapOfHAsciiStringOfDevUnit, WOKernel_DataMapOfHAsciiStringOfFactory, WOKernel_DataMapOfHAsciiStringOfFile, WOKernel_DataMapOfHAsciiStringOfParcel, WOKernel_DataMapOfHAsciiStringOfWarehouse, WOKernel_DataMapOfHAsciiStringOfWorkbench, WOKernel_DataMapOfHAsciiStringOfWorkshop, WOKMake_DataMapOfHAsciiStringOfDevUnit, WOKMake_DataMapOfHAsciiStringOfSequenceOfHAsciiString, WOKMake_DataMapOfHAsciiStringOfStep, WOKMake_DataMapOfHAsciiStringOfStepBuilder, WOKMake_IndexedDataMapOfBuildProcessGroup, WOKMake_IndexedDataMapOfHAsciiStringOfInputFile, WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile, WOKMake_IndexedMapOfDepItem, WOKOrbix_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHSequenceOfHAsciiString, WOKTools_IndexedDataMapOfHAsciiString, WOKTools_IndexedMapOfHAsciiString, WOKTools_MapOfHAsciiString, and WOKUtils_MapOfPath.

void* WOKTools_BasicMap::operator new | ( | size_t | size | ) | `[inline]`

Reimplemented in MS_MapOfGlobalEntity, MS_MapOfMethod, MS_MapOfType, WOKBuilder_DataMapOfHAsciiStringOfMSEntity, WOKBuilder_DataMapOfHAsciiStringOfToolInShell, WOKBuilder_DataMapOfMSActionIDOfMSAction, WOKBuilder_MapOfMSAction, WOKDeliv_DataMapOfFiles, WOKDeliv_DataMapOfParcel, WOKernel_DataMapOfFileType, WOKernel_DataMapOfFileTypeBase, WOKernel_DataMapOfHAsciiStringOfDevUnit, WOKernel_DataMapOfHAsciiStringOfFactory, WOKernel_DataMapOfHAsciiStringOfFile, WOKernel_DataMapOfHAsciiStringOfParcel, WOKernel_DataMapOfHAsciiStringOfWarehouse, WOKernel_DataMapOfHAsciiStringOfWorkbench, WOKernel_DataMapOfHAsciiStringOfWorkshop, WOKMake_DataMapOfHAsciiStringOfDevUnit, WOKMake_DataMapOfHAsciiStringOfSequenceOfHAsciiString, WOKMake_DataMapOfHAsciiStringOfStep, WOKMake_DataMapOfHAsciiStringOfStepBuilder, WOKMake_IndexedDataMapOfBuildProcessGroup, WOKMake_IndexedDataMapOfHAsciiStringOfInputFile, WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile, WOKMake_IndexedMapOfDepItem, WOKOrbix_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHSequenceOfHAsciiString, WOKTools_IndexedDataMapOfHAsciiString, WOKTools_IndexedMapOfHAsciiString, WOKTools_MapOfHAsciiString, and WOKUtils_MapOfPath.

void* WOKTools_BasicMap::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Reimplemented in MS_MapOfGlobalEntity, MS_MapOfMethod, MS_MapOfType, WOKBuilder_DataMapOfHAsciiStringOfMSEntity, WOKBuilder_DataMapOfHAsciiStringOfToolInShell, WOKBuilder_DataMapOfMSActionIDOfMSAction, WOKBuilder_MapOfMSAction, WOKDeliv_DataMapOfFiles, WOKDeliv_DataMapOfParcel, WOKernel_DataMapOfFileType, WOKernel_DataMapOfFileTypeBase, WOKernel_DataMapOfHAsciiStringOfDevUnit, WOKernel_DataMapOfHAsciiStringOfFactory, WOKernel_DataMapOfHAsciiStringOfFile, WOKernel_DataMapOfHAsciiStringOfParcel, WOKernel_DataMapOfHAsciiStringOfWarehouse, WOKernel_DataMapOfHAsciiStringOfWorkbench, WOKernel_DataMapOfHAsciiStringOfWorkshop, WOKMake_DataMapOfHAsciiStringOfDevUnit, WOKMake_DataMapOfHAsciiStringOfSequenceOfHAsciiString, WOKMake_DataMapOfHAsciiStringOfStep, WOKMake_DataMapOfHAsciiStringOfStepBuilder, WOKMake_IndexedDataMapOfBuildProcessGroup, WOKMake_IndexedDataMapOfHAsciiStringOfInputFile, WOKMake_IndexedDataMapOfHAsciiStringOfOutputFile, WOKMake_IndexedMapOfDepItem, WOKOrbix_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHAsciiString, WOKTools_DataMapOfHAsciiStringOfHSequenceOfHAsciiString, WOKTools_IndexedDataMapOfHAsciiString, WOKTools_IndexedMapOfHAsciiString, WOKTools_MapOfHAsciiString, and WOKUtils_MapOfPath.

Standard_Boolean WOKTools_BasicMap::Resizable | ( |  | ) | const`[inline, protected]`

Standard_EXPORT void WOKTools_BasicMap::Statistics | ( | Standard_OStream & | S | ) | const

## Field Documentation

Standard_Boolean WOKTools_BasicMap::isDouble `[private]`

Standard_Address WOKTools_BasicMap::myData1 `[protected]`

Standard_Address WOKTools_BasicMap::myData2 `[protected]`

Standard_Integer WOKTools_BasicMap::myNbBuckets `[private]`

Standard_Boolean WOKTools_BasicMap::mySaturated `[private]`

Standard_Integer WOKTools_BasicMap::mySize `[private]`

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

- WOKTools_BasicMap.hxx
- WOKTools_BasicMap.lxx