Open CASCADE Technology  6.9.0
Public Member Functions | Protected Member Functions | Protected Attributes

TCollection_BasicMap Class Reference

Root class of all the maps, provides utilitites for managing the buckets. Maps are dynamically extended data structures where data is quickly accessed with a key. General properties of maps. More...

#include <TCollection_BasicMap.hxx>

Inherited by AIS_DataMapOfILC, AIS_DataMapofIntegerListOfinteractive, AIS_DataMapOfIOStatus, AIS_DataMapOfSelStat, AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive, BinMDF_TypeADriverMap, BinMDF_TypeIdMap, BiTgte_DataMapOfShapeBox, BRepAlgo_DataMapOfShapeBoolean, BRepAlgo_DataMapOfShapeInterference, BRepCheck_DataMapOfShapeListOfStatus, BRepCheck_DataMapOfShapeResult, BRepClass3d_MapOfInter, BRepFill_DataMapOfNodeDataMapOfShapeShape, BRepFill_DataMapOfNodeShape, BRepFill_DataMapOfOrientedShapeListOfShape, BRepFill_DataMapOfShapeDataMapOfShapeListOfShape, BRepFill_DataMapOfShapeHArray2OfShape, BRepFill_DataMapOfShapeSequenceOfPnt, BRepFill_DataMapOfShapeSequenceOfReal, BRepFill_IndexedDataMapOfOrientedShapeListOfShape, BRepMAT2d_DataMapOfBasicEltShape, BRepMAT2d_DataMapOfShapeSequenceOfBasicElt, BRepOffset_DataMapOfShapeListOfInterval, BRepOffset_DataMapOfShapeMapOfShape, BRepOffset_DataMapOfShapeOffset, BRepTools_MapOfVertexPnt2d, BRepTopAdaptor_MapOfShapeTool, CDM_MapOfDocument, CDM_MetaDataLookUpTable, CDM_PresentationDirectory, ChFiDS_IndexedDataMapOfVertexListOfStripe, ChFiKPart_RstMap, DNaming_DataMapOfShapeOfName, Draft_DataMapOfEdgeEdgeInfo, Draft_DataMapOfFaceFaceInfo, Draft_DataMapOfVertexVertexInfo, Draw_MapOfAsciiString, Expr_MapOfNamedUnknown, Geom2dHatch_Hatchings, Geom2dHatch_MapOfElements, HLRTopoBRep_DataMapOfShapeFaceData, HLRTopoBRep_MapOfShapeListOfVData, Interface_DataMapOfTransientInteger, Interface_IndexedMapOfAsciiString, IntTools_DataMapOfCurveSampleBox, IntTools_DataMapOfSurfaceSampleBox, IntTools_IndexedDataMapOfTransientAddress, IntTools_MapOfCurveSample, IntTools_MapOfSurfaceSample, LocOpe_DataMapOfShapePnt, MAT2d_DataMapOfBiIntInteger, MAT2d_DataMapOfBiIntSequenceOfInteger, MAT2d_DataMapOfIntegerBisec, MAT2d_DataMapOfIntegerConnexion, MAT2d_DataMapOfIntegerPnt2d, MAT2d_DataMapOfIntegerSequenceOfConnexion, MAT2d_DataMapOfIntegerVec2d, MAT_DataMapOfIntegerArc, MAT_DataMapOfIntegerBasicElt, MAT_DataMapOfIntegerBisector, MAT_DataMapOfIntegerNode, MDF_TypeARDriverMap, MDF_TypeASDriverMap, MDF_TypeDriverListMapOfARDriverTable, MDF_TypeDriverListMapOfASDriverTable, MeshVS_DataMapOfColorMapOfInteger, MeshVS_DataMapOfHArray1OfSequenceOfInteger, MeshVS_DataMapOfIntegerAsciiString, MeshVS_DataMapOfIntegerBoolean, MeshVS_DataMapOfIntegerColor, MeshVS_DataMapOfIntegerMaterial, MeshVS_DataMapOfIntegerMeshEntityOwner, MeshVS_DataMapOfIntegerOwner, MeshVS_DataMapOfIntegerTwoColors, MeshVS_DataMapOfIntegerVector, MeshVS_DataMapOfTwoColorsMapOfInteger, MeshVS_MapOfTwoNodes, MoniTool_DataMapOfShapeTransient, MoniTool_DataMapOfTimer, MoniTool_IndexedDataMapOfShapeTransient, Plugin_MapOfFunctions, PTColStd_DoubleMapOfTransientPersistent, PTColStd_PersistentTransientMap, PTColStd_TransientPersistentMap, QANCollection_DataMapOfRealPnt, QANCollection_DoubleMapOfRealInteger, QANCollection_IndexedDataMapOfRealPnt, Resource_DataMapOfAsciiStringAsciiString, Resource_DataMapOfAsciiStringExtendedString, SelectMgr_DataMapOfObjectSelectors, SelectMgr_IndexedDataMapOfOwnerCriterion, SelectMgr_IndexedMapOfOwner, ShapeAnalysis_DataMapOfShapeListOfReal, ShapeExtend_DataMapOfShapeListOfMsg, ShapeExtend_DataMapOfTransientListOfMsg, ShapeFix_DataMapOfShapeBox2d, StdSelect_IndexedDataMapOfOwnerPrs, STEPCAFControl_DataMapOfLabelExternFile, STEPCAFControl_DataMapOfLabelShape, STEPCAFControl_DataMapOfPDExternFile, STEPCAFControl_DataMapOfSDRExternFile, STEPCAFControl_DataMapOfShapePD, STEPCAFControl_DataMapOfShapeSDR, STEPConstruct_DataMapOfAsciiStringTransient, STEPConstruct_DataMapOfPointTransient, StepToTopoDS_DataMapOfRI, StepToTopoDS_DataMapOfRINames, StepToTopoDS_DataMapOfTRI, StepToTopoDS_PointEdgeMap, StepToTopoDS_PointVertexMap, Storage_MapOfCallBack, Storage_MapOfPers, Storage_PType, TColStd_DataMapOfAsciiStringInteger, TColStd_DataMapOfIntegerInteger, TColStd_DataMapOfIntegerListOfInteger, TColStd_DataMapOfIntegerReal, TColStd_DataMapOfIntegerTransient, TColStd_DataMapOfStringInteger, TColStd_DataMapOfTransientTransient, TColStd_IndexedDataMapOfTransientTransient, TColStd_IndexedMapOfInteger, TColStd_IndexedMapOfReal, TColStd_IndexedMapOfTransient, TColStd_MapOfAsciiString, TColStd_MapOfInteger, TColStd_MapOfReal, TColStd_MapOfTransient, TColStd_PackedMapOfInteger [private], TDataStd_DataMapOfStringByte, TDataStd_DataMapOfStringHArray1OfInteger, TDataStd_DataMapOfStringHArray1OfReal, TDataStd_DataMapOfStringReal, TDataStd_DataMapOfStringString, TDF_AttributeDataMap, TDF_AttributeDoubleMap, TDF_AttributeIndexedMap, TDF_AttributeMap, TDF_GUIDProgIDMap, TDF_IDMap, TDF_LabelDataMap, TDF_LabelDoubleMap, TDF_LabelIndexedMap, TDF_LabelIntegerMap, TDF_LabelMap, TDocStd_LabelIDMapDataMap, TFunction_DataMapOfGUIDDriver, TFunction_DataMapOfLabelListOfLabel, TFunction_DoubleMapOfIntegerLabel, TNaming_DataMapOfShapePtrRefShape, TNaming_DataMapOfShapeShapesSet, TNaming_MapOfNamedShape, TopLoc_IndexedMapOfLocation, TopLoc_MapOfLocation, TopOpeBRep_DataMapOfTopolTool, TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape, TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo, TopOpeBRepDS_DataMapOfCheckStatus, TopOpeBRepDS_DataMapOfIntegerListOfInterference, TopOpeBRepDS_DataMapOfInterferenceListOfInterference, TopOpeBRepDS_DataMapOfInterferenceShape, TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State, TopOpeBRepDS_DataMapOfShapeState, TopOpeBRepDS_DoubleMapOfIntegerShape, TopOpeBRepDS_IndexedDataMapOfShapeWithState, TopOpeBRepDS_IndexedDataMapOfVertexPoint, TopOpeBRepDS_MapOfCurve, TopOpeBRepDS_MapOfIntegerShapeData, TopOpeBRepDS_MapOfPoint, TopOpeBRepDS_MapOfShapeData, TopOpeBRepDS_MapOfSurface, TopOpeBRepDS_ShapeSurface, TopOpeBRepTool_DataMapOfOrientedShapeC2DF, TopOpeBRepTool_DataMapOfShapeface, TopOpeBRepTool_DataMapOfShapeListOfC2DF, TopOpeBRepTool_IndexedDataMapOfShapeBox, TopOpeBRepTool_IndexedDataMapOfShapeBox2d, TopOpeBRepTool_IndexedDataMapOfShapeconnexity, TopOpeBRepTool_IndexedDataMapOfSolidClassifier, TopTools_DataMapOfIntegerListOfShape, TopTools_DataMapOfIntegerShape, TopTools_DataMapOfOrientedShapeInteger, TopTools_DataMapOfOrientedShapeShape, TopTools_DataMapOfShapeInteger, TopTools_DataMapOfShapeListOfInteger, TopTools_DataMapOfShapeListOfShape, TopTools_DataMapOfShapeReal, TopTools_DataMapOfShapeSequenceOfShape, TopTools_DataMapOfShapeShape, TopTools_IndexedDataMapOfShapeAddress, TopTools_IndexedDataMapOfShapeListOfShape, TopTools_IndexedDataMapOfShapeShape, TopTools_IndexedMapOfOrientedShape, TopTools_IndexedMapOfShape, TopTools_MapOfOrientedShape, TopTools_MapOfShape, TPrsStd_DataMapOfGUIDDriver, Transfer_TransferMapOfProcessForFinder, Transfer_TransferMapOfProcessForTransient, ViewerTest_DoubleMapOfInteractiveAndName, XCAFDoc_DataMapOfShapeLabel, XCAFPrs_DataMapOfShapeStyle, XCAFPrs_DataMapOfStyleShape, XCAFPrs_DataMapOfStyleTransient, XmlMDF_MapOfDriver, XmlMDF_TypeADriverMap, XSDRAWSTLVRML_CoordsMap, and XSDRAWSTLVRML_ElemNodesMap.

Public Member Functions

Standard_Integer NbBuckets () const
 Returns the number of buckets in <me>. More...
 
Standard_Integer Extent () const
 Returns the number of keys already stored in <me>. More...
 
Standard_Boolean IsEmpty () const
 Returns True when the map contains no keys. This is exactly Extent() == 0. More...
 
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. More...
 

Protected Member Functions

 TCollection_BasicMap (const Standard_Integer NbBuckets, const Standard_Boolean single)
 Initialize the map. Single is True when the map uses only one table of buckets. More...
 
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. More...
 
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. More...
 
Standard_Boolean Resizable () const
 Returns True if resizing the map should be considered. More...
 
void Increment ()
 Decrement the extent of the map. More...
 
void Decrement ()
 Decrement the extent of the map. More...
 
void Destroy ()
 Destroys the buckets. More...
 

Protected Attributes

Standard_Address myData1
 
Standard_Address myData2
 

Detailed Description

Root class of all the maps, provides utilitites for managing the buckets. Maps are dynamically extended data structures where data is quickly accessed with a key. General properties of maps.

Constructor & Destructor Documentation

TCollection_BasicMap::TCollection_BasicMap ( const Standard_Integer  NbBuckets,
const Standard_Boolean  single 
)
protected

Initialize the map. Single is True when the map uses only one table of buckets.

One table : Map, DataMap Two tables : DoubleMap, IndexedMap, IndexedDataMap

Member Function Documentation

Standard_Boolean TCollection_BasicMap::BeginResize ( const Standard_Integer  NbBuckets,
Standard_Integer NewBuckets,
Standard_Address data1,
Standard_Address data2 
) const
protected

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.

void TCollection_BasicMap::Decrement ( )
protected

Decrement the extent of the map.

void TCollection_BasicMap::Destroy ( )
protected

Destroys the buckets.

void TCollection_BasicMap::EndResize ( const Standard_Integer  NbBuckets,
const Standard_Integer  NewBuckets,
const Standard_Address  data1,
const Standard_Address  data2 
)
protected

If BeginResize was succesfull after copying the data to data1 and data2 this methods update the tables and destroys the old ones.

Standard_Integer TCollection_BasicMap::Extent ( ) const

Returns the number of keys already stored in <me>.

void TCollection_BasicMap::Increment ( )
protected

Decrement the extent of the map.

Standard_Boolean TCollection_BasicMap::IsEmpty ( ) const

Returns True when the map contains no keys. This is exactly Extent() == 0.

Standard_Integer TCollection_BasicMap::NbBuckets ( ) const

Returns the number of buckets in <me>.

Standard_Boolean TCollection_BasicMap::Resizable ( ) const
protected

Returns True if resizing the map should be considered.

void TCollection_BasicMap::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.

Field Documentation

Standard_Address TCollection_BasicMap::myData1
protected
Standard_Address TCollection_BasicMap::myData2
protected

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