Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 > Class Template Reference

#include <NCollection_DoubleMap.hxx>

Inheritance diagram for NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >:
Inheritance graph
[legend]

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 size_t theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor.
 
 NCollection_DoubleMap (const int theNbBuckets, const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr)
 Constructor (legacy int-taking).
 
 NCollection_DoubleMap (const NCollection_DoubleMap &theOther)
 Copy constructor.
 
void Exchange (NCollection_DoubleMap &theOther) noexcept
 Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!
 
NCollection_DoubleMapAssign (const NCollection_DoubleMap &theOther)
 Assignment. This method does not change the internal allocator.
 
NCollection_DoubleMapoperator= (const NCollection_DoubleMap &theOther)
 Assignment operator.
 
void ReSize (const size_t N)
 ReSize.
 
void ReSize (const int N)
 
void Bind (const TheKey1Type &theKey1, const TheKey2Type &theKey2)
 Bind binds the pair (Key1, Key2).
 
void Bind (TheKey1Type &&theKey1, const TheKey2Type &theKey2)
 Bind binds the pair (Key1, Key2).
 
void Bind (const TheKey1Type &theKey1, TheKey2Type &&theKey2)
 Bind binds the pair (Key1, Key2).
 
void Bind (TheKey1Type &&theKey1, TheKey2Type &&theKey2)
 Bind binds the pair (Key1, Key2).
 
bool TryBind (const TheKey1Type &theKey1, const TheKey2Type &theKey2)
 TryBind binds the pair (Key1, Key2) only if neither key is already bound.
 
bool TryBind (TheKey1Type &&theKey1, const TheKey2Type &theKey2)
 TryBind binds the pair (Key1, Key2) only if neither key is already bound.
 
bool TryBind (const TheKey1Type &theKey1, TheKey2Type &&theKey2)
 TryBind binds the pair (Key1, Key2) only if neither key is already bound.
 
bool TryBind (TheKey1Type &&theKey1, TheKey2Type &&theKey2)
 TryBind binds the pair (Key1, Key2) only if neither key is already bound.
 
template<typename K1 , typename K2 >
bool TryEmplace (K1 &&theKey1, K2 &&theKey2)
 TryEmplace constructs keys in-place only if neither key is already bound.
 
bool AreBound (const TheKey1Type &theKey1, const TheKey2Type &theKey2) const
 
bool IsBound1 (const TheKey1Type &theKey1) const
 IsBound1.
 
bool IsBound2 (const TheKey2Type &theKey2) const
 IsBound2.
 
bool UnBind1 (const TheKey1Type &theKey1)
 UnBind1.
 
bool UnBind2 (const TheKey2Type &theKey2)
 UnBind2.
 
const TheKey2TypeFind1 (const TheKey1Type &theKey1) const
 Find the Key1 and return Key2 value. Raises an exception if Key1 was not bound.
 
bool Find1 (const TheKey1Type &theKey1, TheKey2Type &theKey2) const
 Find the Key1 and return Key2 value (by copying its value).
 
const TheKey2TypeSeek1 (const TheKey1Type &theKey1) const
 Find the Key1 and return pointer to Key2 or NULL if Key1 is not bound.
 
const TheKey1TypeFind2 (const TheKey2Type &theKey2) const
 Find the Key2 and return Key1 value. Raises an exception if Key2 was not bound.
 
bool Find2 (const TheKey2Type &theKey2, TheKey1Type &theKey1) const
 Find the Key2 and return Key1 value (by copying its value).
 
const TheKey1TypeSeek2 (const TheKey2Type &theKey2) const
 Find the Key2 and return pointer to Key1 or NULL if not bound.
 
void Clear (const bool doReleaseMemory=false)
 Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused.
 
void Clear (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Clear data and reset allocator.
 
 ~NCollection_DoubleMap () override
 Destructor.
 
- Public Member Functions inherited from NCollection_BaseMap
size_t NbBuckets () const noexcept
 NbBuckets.
 
int Extent () const noexcept
 Extent (number of elements, legacy int-returning API).
 
int Length () const noexcept
 Length - number of elements (legacy int-returning API, synonym of Extent()).
 
size_t Size () const noexcept
 Size - number of elements.
 
bool IsEmpty () const noexcept
 IsEmpty.
 
const occ::handle< NCollection_BaseAllocator > & Allocator () const noexcept
 Returns attached allocator.
 

Protected Member Functions

bool IsEqual1 (const TheKey1Type &theKey1, const TheKey1Type &theKey2) const
 
size_t HashCode1 (const TheKey1Type &theKey, const size_t theUpperBound) const
 
bool IsEqual2 (const TheKey2Type &theKey1, const TheKey2Type &theKey2) const
 
size_t HashCode2 (const TheKey2Type &theKey, const size_t theUpperBound) const
 
bool lookup1 (const TheKey1Type &theKey1, DoubleMapNode *&theNode, size_t &theHash) const
 Lookup for particular key1 in map.
 
bool lookup2 (const TheKey2Type &theKey2, DoubleMapNode *&theNode, size_t &theHash) const
 Lookup for particular key2 in map.
 
template<typename K1 , typename K2 , bool IsTry>
bool bindImpl (K1 &&theKey1, K2 &&theKey2, std::bool_constant< IsTry >)
 Implementation helper for Bind/TryBind.
 
- Protected Member Functions inherited from NCollection_BaseMap
 NCollection_BaseMap (const size_t theNbBuckets, const bool single, const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Constructor.
 
 NCollection_BaseMap (NCollection_BaseMap &&theOther) noexcept
 Move Constructor.
 
virtual ~NCollection_BaseMap ()=default
 Destructor.
 
bool BeginResize (const size_t theExtent, size_t &theNewBuckets, NCollection_ListNode **&data1, NCollection_ListNode **&data2) const
 BeginResize.
 
void EndResize (const size_t theExtent, const size_t theNewBuckets, NCollection_ListNode **data1, NCollection_ListNode **data2) noexcept
 EndResize.
 
bool Resizable () const noexcept
 Resizable.
 
size_t Increment () noexcept
 Increment.
 
size_t Decrement () noexcept
 Decrement.
 
void Destroy (NCollection_DelMapNode fDel, bool doReleaseMemory=true)
 Destroy.
 
size_t NextPrimeForMap (const size_t N) const noexcept
 NextPrimeForMap.
 
void exchangeMapsData (NCollection_BaseMap &theOther) noexcept
 Exchange content of two maps without data copying.
 
NCollection_BaseMapoperator= (NCollection_BaseMap &&) noexcept=delete
 Move operator.
 
 NCollection_BaseMap (const NCollection_BaseMap &)=delete
 Copy Constructor.
 
NCollection_BaseMapoperator= (const NCollection_BaseMap &)=delete
 Assign operator.
 

Protected Attributes

Hasher1 myHasher1
 
Hasher2 myHasher2
 
- Protected Attributes inherited from NCollection_BaseMap
occ::handle< NCollection_BaseAllocatormyAllocator
 
NCollection_ListNode ** myData1
 
NCollection_ListNode ** myData2
 

Additional Inherited Members

- Static Protected Member Functions inherited from NCollection_BaseMap
static size_t NbBucketsFromInt (const int theNbBuckets)
 Converts legacy int bucket count to size_t with validation.
 

Detailed Description

template<class TheKey1Type, class TheKey2Type, class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
class NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >

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

Member Typedef Documentation

◆ key1_type

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
typedef TheKey1Type NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::key1_type

STL-compliant typedef for key1 type.

◆ key2_type

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
typedef TheKey2Type NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::key2_type

STL-compliant typedef for key2 type.

Constructor & Destructor Documentation

◆ NCollection_DoubleMap() [1/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::NCollection_DoubleMap ( )
inline

Empty constructor.

◆ NCollection_DoubleMap() [2/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::NCollection_DoubleMap ( const size_t theNbBuckets,
const occ::handle< NCollection_BaseAllocator > & theAllocator = nullptr )
inlineexplicit

Constructor.

◆ NCollection_DoubleMap() [3/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::NCollection_DoubleMap ( const int theNbBuckets,
const occ::handle< NCollection_BaseAllocator > & theAllocator = nullptr )
inlineexplicit

Constructor (legacy int-taking).

◆ NCollection_DoubleMap() [4/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::NCollection_DoubleMap ( const NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 > & theOther)
inline

Copy constructor.

◆ ~NCollection_DoubleMap()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::~NCollection_DoubleMap ( )
inlineoverride

Destructor.

Member Function Documentation

◆ AreBound()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::AreBound ( const TheKey1Type & theKey1,
const TheKey2Type & theKey2 ) const
inline
  • AreBound

◆ Assign()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap & NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Assign ( const NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 > & theOther)
inline

Assignment. This method does not change the internal allocator.

◆ Bind() [1/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Bind ( const TheKey1Type & theKey1,
const TheKey2Type & theKey2 )
inline

Bind binds the pair (Key1, Key2).

Exceptions
Standard_MultiplyDefinedif Key1 or Key2 is already bound

◆ Bind() [2/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Bind ( const TheKey1Type & theKey1,
TheKey2Type && theKey2 )
inline

Bind binds the pair (Key1, Key2).

Exceptions
Standard_MultiplyDefinedif Key1 or Key2 is already bound

◆ Bind() [3/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Bind ( TheKey1Type && theKey1,
const TheKey2Type & theKey2 )
inline

Bind binds the pair (Key1, Key2).

Exceptions
Standard_MultiplyDefinedif Key1 or Key2 is already bound

◆ Bind() [4/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Bind ( TheKey1Type && theKey1,
TheKey2Type && theKey2 )
inline

Bind binds the pair (Key1, Key2).

Exceptions
Standard_MultiplyDefinedif Key1 or Key2 is already bound

◆ bindImpl()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
template<typename K1 , typename K2 , bool IsTry>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::bindImpl ( K1 && theKey1,
K2 && theKey2,
std::bool_constant< IsTry >  )
inlineprotected

Implementation helper for Bind/TryBind.

Template Parameters
K1forwarding reference type for key1
K2forwarding reference type for key2
IsTryif true, returns false on existing key; if false, throws exception
Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists (only for IsTry=true)

◆ Clear() [1/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Clear ( const bool doReleaseMemory = false)
inline

Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused.

◆ Clear() [2/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Clear ( const occ::handle< NCollection_BaseAllocator > & theAllocator)
inline

Clear data and reset allocator.

◆ Exchange()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Exchange ( NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 > & theOther)
inlinenoexcept

Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!

◆ Find1() [1/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
const TheKey2Type & NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Find1 ( const TheKey1Type & theKey1) const
inline

Find the Key1 and return Key2 value. Raises an exception if Key1 was not bound.

◆ Find1() [2/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Find1 ( const TheKey1Type & theKey1,
TheKey2Type & theKey2 ) const
inline

Find the Key1 and return Key2 value (by copying its value).

Parameters
[in]theKey1Key1 to find
[out]theKey2Key2 to return
Returns
TRUE if Key1 has been found

◆ Find2() [1/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
const TheKey1Type & NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Find2 ( const TheKey2Type & theKey2) const
inline

Find the Key2 and return Key1 value. Raises an exception if Key2 was not bound.

◆ Find2() [2/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Find2 ( const TheKey2Type & theKey2,
TheKey1Type & theKey1 ) const
inline

Find the Key2 and return Key1 value (by copying its value).

Parameters
[in]theKey2Key2 to find
[out]theKey1Key1 to return
Returns
TRUE if Key2 has been found

◆ HashCode1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
size_t NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::HashCode1 ( const TheKey1Type & theKey,
const size_t theUpperBound ) const
inlineprotected

◆ HashCode2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
size_t NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::HashCode2 ( const TheKey2Type & theKey,
const size_t theUpperBound ) const
inlineprotected

◆ IsBound1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::IsBound1 ( const TheKey1Type & theKey1) const
inline

IsBound1.

◆ IsBound2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::IsBound2 ( const TheKey2Type & theKey2) const
inline

IsBound2.

◆ IsEqual1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::IsEqual1 ( const TheKey1Type & theKey1,
const TheKey1Type & theKey2 ) const
inlineprotected

◆ IsEqual2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::IsEqual2 ( const TheKey2Type & theKey1,
const TheKey2Type & theKey2 ) const
inlineprotected

◆ lookup1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::lookup1 ( const TheKey1Type & theKey1,
DoubleMapNode *& theNode,
size_t & theHash ) const
inlineprotected

Lookup for particular key1 in map.

Parameters
[in]theKey1key to search
[out]theNodethe detected node with equal key. Can be null.
[out]theHashcomputed bounded hash code for current key.
Returns
true if key1 is found

◆ lookup2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::lookup2 ( const TheKey2Type & theKey2,
DoubleMapNode *& theNode,
size_t & theHash ) const
inlineprotected

Lookup for particular key2 in map.

Parameters
[in]theKey2key to search
[out]theNodethe detected node with equal key. Can be null.
[out]theHashcomputed bounded hash code for current key.
Returns
true if key2 is found

◆ operator=()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
NCollection_DoubleMap & NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::operator= ( const NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 > & theOther)
inline

Assignment operator.

◆ ReSize() [1/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::ReSize ( const int N)
inline

◆ ReSize() [2/2]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
void NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::ReSize ( const size_t N)
inline

ReSize.

◆ Seek1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
const TheKey2Type * NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Seek1 ( const TheKey1Type & theKey1) const
inline

Find the Key1 and return pointer to Key2 or NULL if Key1 is not bound.

Parameters
[in]theKey1Key1 to find
Returns
pointer to Key2 or NULL if Key1 is not found

◆ Seek2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
const TheKey1Type * NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::Seek2 ( const TheKey2Type & theKey2) const
inline

Find the Key2 and return pointer to Key1 or NULL if not bound.

Parameters
[in]theKey2Key2 to find
Returns
pointer to Key1 if Key2 has been found

◆ TryBind() [1/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::TryBind ( const TheKey1Type & theKey1,
const TheKey2Type & theKey2 )
inline

TryBind binds the pair (Key1, Key2) only if neither key is already bound.

Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists

◆ TryBind() [2/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::TryBind ( const TheKey1Type & theKey1,
TheKey2Type && theKey2 )
inline

TryBind binds the pair (Key1, Key2) only if neither key is already bound.

Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists

◆ TryBind() [3/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::TryBind ( TheKey1Type && theKey1,
const TheKey2Type & theKey2 )
inline

TryBind binds the pair (Key1, Key2) only if neither key is already bound.

Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists

◆ TryBind() [4/4]

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::TryBind ( TheKey1Type && theKey1,
TheKey2Type && theKey2 )
inline

TryBind binds the pair (Key1, Key2) only if neither key is already bound.

Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists

◆ TryEmplace()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
template<typename K1 , typename K2 >
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::TryEmplace ( K1 && theKey1,
K2 && theKey2 )
inline

TryEmplace constructs keys in-place only if neither key is already bound.

Parameters
theKey1first key to bind
theKey2second key to bind
Returns
true if pair was successfully bound, false if either key already exists

◆ UnBind1()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::UnBind1 ( const TheKey1Type & theKey1)
inline

UnBind1.

◆ UnBind2()

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
bool NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::UnBind2 ( const TheKey2Type & theKey2)
inline

UnBind2.

Field Documentation

◆ myHasher1

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
Hasher1 NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::myHasher1
protected

◆ myHasher2

template<class TheKey1Type , class TheKey2Type , class Hasher1 = NCollection_DefaultHasher<TheKey1Type>, class Hasher2 = NCollection_DefaultHasher<TheKey2Type>>
Hasher2 NCollection_DoubleMap< TheKey1Type, TheKey2Type, Hasher1, Hasher2 >::myHasher2
protected

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