#include <NCollection_DoubleMap.hxx>

Data Structures | |
| class | DoubleMapNode |
| class | Iterator |
Public Types | |
| typedef TheKey1Type | key1_type |
| STL-compliant typedef for key1 type. | |
| typedef TheKey2Type | key2_type |
| STL-compliant typedef for key2 type. | |
Public Member Functions | |
| NCollection_DoubleMap () | |
| Empty constructor. | |
| NCollection_DoubleMap (const Standard_Integer theNbBuckets, const Handle< NCollection_BaseAllocator > &theAllocator=0L) | |
| Constructor. | |
| NCollection_DoubleMap (const NCollection_DoubleMap &theOther) | |
| Copy constructor. | |
| void | Exchange (NCollection_DoubleMap &theOther) |
| Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! | |
| NCollection_DoubleMap & | Assign (const NCollection_DoubleMap &theOther) |
| Assignment. This method does not change the internal allocator. | |
| NCollection_DoubleMap & | operator= (const NCollection_DoubleMap &theOther) |
| Assignment operator. | |
| void | ReSize (const Standard_Integer N) |
| ReSize. | |
| void | Bind (const TheKey1Type &theKey1, const TheKey2Type &theKey2) |
| Bind. | |
| Standard_Boolean | AreBound (const TheKey1Type &theKey1, const TheKey2Type &theKey2) const |
| Standard_Boolean | IsBound1 (const TheKey1Type &theKey1) const |
| IsBound1. | |
| Standard_Boolean | IsBound2 (const TheKey2Type &theKey2) const |
| IsBound2. | |
| Standard_Boolean | UnBind1 (const TheKey1Type &theKey1) |
| UnBind1. | |
| Standard_Boolean | UnBind2 (const TheKey2Type &theKey2) |
| UnBind2. | |
| const TheKey2Type & | Find1 (const TheKey1Type &theKey1) const |
| Find the Key1 and return Key2 value. Raises an exception if Key1 was not bound. | |
| Standard_Boolean | Find1 (const TheKey1Type &theKey1, TheKey2Type &theKey2) const |
| Find the Key1 and return Key2 value (by copying its value). | |
| const TheKey2Type * | Seek1 (const TheKey1Type &theKey1) const |
| Find the Key1 and return pointer to Key2 or NULL if Key1 is not bound. | |
| const TheKey1Type & | Find2 (const TheKey2Type &theKey2) const |
| Find the Key2 and return Key1 value. Raises an exception if Key2 was not bound. | |
| Standard_Boolean | Find2 (const TheKey2Type &theKey2, TheKey1Type &theKey1) const |
| Find the Key2 and return Key1 value (by copying its value). | |
| const TheKey1Type * | Seek2 (const TheKey2Type &theKey2) const |
| Find the Key2 and return pointer to Key1 or NULL if not bound. | |
| void | Clear (const Standard_Boolean doReleaseMemory=Standard_False) |
| Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused. | |
| void | Clear (const Handle< NCollection_BaseAllocator > &theAllocator) |
| Clear data and reset allocator. | |
| ~NCollection_DoubleMap (void) | |
| Destructor. | |
| Standard_Integer | Size (void) const |
| Size. | |
Public Member Functions inherited from NCollection_BaseMap | |
| Standard_Integer | NbBuckets () const |
| NbBuckets. | |
| Standard_Integer | Extent () const |
| Extent. | |
| Standard_Boolean | IsEmpty () const |
| IsEmpty. | |
| void | Statistics (Standard_OStream &S) const |
| Statistics. | |
| const Handle< NCollection_BaseAllocator > & | Allocator () const |
| Returns attached allocator. | |
Protected Member Functions | |
| bool | IsEqual1 (const TheKey1Type &theKey1, const TheKey1Type &theKey2) const |
| size_t | HashCode1 (const TheKey1Type &theKey, const int theUpperBound) const |
| bool | IsEqual2 (const TheKey2Type &theKey1, const TheKey2Type &theKey2) const |
| size_t | HashCode2 (const TheKey2Type &theKey, const int theUpperBound) const |
Protected Member Functions inherited from NCollection_BaseMap | |
| NCollection_BaseMap (const Standard_Integer NbBuckets, const Standard_Boolean single, const Handle< NCollection_BaseAllocator > &theAllocator) | |
| Constructor. | |
| NCollection_BaseMap (NCollection_BaseMap &&theOther) noexcept | |
| Move Constructor. | |
| virtual | ~NCollection_BaseMap () |
| Destructor. | |
| Standard_Boolean | BeginResize (const Standard_Integer NbBuckets, Standard_Integer &NewBuckets, NCollection_ListNode **&data1, NCollection_ListNode **&data2) const |
| BeginResize. | |
| void | EndResize (const Standard_Integer NbBuckets, const Standard_Integer NewBuckets, NCollection_ListNode **data1, NCollection_ListNode **data2) |
| EndResize. | |
| Standard_Boolean | Resizable () const |
| Resizable. | |
| Standard_Integer | Increment () |
| Increment. | |
| Standard_Integer | Decrement () |
| Decrement. | |
| void | Destroy (NCollection_DelMapNode fDel, Standard_Boolean doReleaseMemory=Standard_True) |
| Destroy. | |
| Standard_Integer | NextPrimeForMap (const Standard_Integer N) const |
| NextPrimeForMap. | |
| void | exchangeMapsData (NCollection_BaseMap &theOther) |
| Exchange content of two maps without data copying. | |
| NCollection_BaseMap & | operator= (NCollection_BaseMap &&) noexcept=delete |
| Move operator. | |
| NCollection_BaseMap (const NCollection_BaseMap &)=delete | |
| Copy Constructor. | |
| NCollection_BaseMap & | operator= (const NCollection_BaseMap &)=delete |
| Assign operator. | |
Protected Attributes | |
| Hasher1 | myHasher1 |
| Hasher2 | myHasher2 |
Protected Attributes inherited from NCollection_BaseMap | |
| Handle< NCollection_BaseAllocator > | myAllocator |
| NCollection_ListNode ** | myData1 |
| NCollection_ListNode ** | myData2 |
Purpose: The DoubleMap is used to bind pairs (Key1,Key2) and retrieve them in linear time.
See Map from NCollection for a discussion about the number of buckets
| typedef TheKey1Type NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::key1_type |
STL-compliant typedef for key1 type.
| typedef TheKey2Type NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::key2_type |
STL-compliant typedef for key2 type.
|
inline |
Empty constructor.
|
inlineexplicit |
Constructor.
|
inline |
Copy constructor.
|
inline |
Destructor.
|
inline |
|
inline |
Assignment. This method does not change the internal allocator.
|
inline |
Bind.
|
inline |
Clear data and reset allocator.
|
inline |
Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused.
|
inline |
Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!
|
inline |
Find the Key1 and return Key2 value. Raises an exception if Key1 was not bound.
|
inline |
Find the Key1 and return Key2 value (by copying its value).
| [in] | theKey1 | Key1 to find |
| [out] | theKey2 | Key2 to return |
|
inline |
Find the Key2 and return Key1 value. Raises an exception if Key2 was not bound.
|
inline |
Find the Key2 and return Key1 value (by copying its value).
| [in] | theKey2 | Key2 to find |
| [out] | theKey1 | Key1 to return |
|
inlineprotected |
|
inlineprotected |
|
inline |
IsBound1.
|
inline |
IsBound2.
|
inlineprotected |
|
inlineprotected |
|
inline |
Assignment operator.
|
inline |
ReSize.
|
inline |
Find the Key1 and return pointer to Key2 or NULL if Key1 is not bound.
| [in] | theKey1 | Key1 to find |
|
inline |
Find the Key2 and return pointer to Key1 or NULL if not bound.
| [in] | theKey2 | Key2 to find |
|
inline |
Size.
|
inline |
UnBind1.
|
inline |
UnBind2.
|
protected |
|
protected |