Open CASCADE Technology 6.6.0
Data Structures | Public Member Functions
NCollection_IndexedMap< TheKeyType, Hasher > Class Template Reference

#include <NCollection_IndexedMap.hxx>

Inheritance diagram for NCollection_IndexedMap< TheKeyType, Hasher >:
Inheritance graph
[legend]

Data Structures

class  IndexedMapNode
class  Iterator

Public Member Functions

 NCollection_IndexedMap (const Standard_Integer NbBuckets=1, const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Constructor.
 NCollection_IndexedMap (const NCollection_IndexedMap &theOther)
 Copy constructor.
virtual void Assign (const NCollection_BaseCollection< TheKeyType > &theOther)
 Assign another collection.
NCollection_IndexedMapoperator= (const NCollection_IndexedMap &theOther)
 = another map
void ReSize (const Standard_Integer N)
 ReSize.
Standard_Integer Add (const TheKeyType &theKey1)
 Add.
Standard_Boolean Contains (const TheKeyType &theKey1) const
 Contains.
void Substitute (const Standard_Integer theIndex, const TheKeyType &theKey1)
 Substitute.
void RemoveLast (void)
 RemoveLast.
const TheKeyType & FindKey (const Standard_Integer theKey2) const
 FindKey.
const TheKeyType & operator() (const Standard_Integer theKey2) const
 operator ()
Standard_Integer FindIndex (const TheKeyType &theKey1) const
 FindIndex.
void Clear (const Standard_Boolean doReleaseMemory=Standard_True)
 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_IndexedMap (void)
 Destructor.
virtual Standard_Integer Size (void) const
 Size.

Detailed Description

template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
class NCollection_IndexedMap< TheKeyType, Hasher >

Purpose: An indexed map is used to store keys and to bind an index to them. Each new key stored in the map gets an index. Index are incremented as keys are stored in the map. A key can be found by the index and an index by the key. No key but the last can be removed so the indices are in the range 1..Extent. See the class Map from NCollection for a discussion about the number of buckets.


Constructor & Destructor Documentation

template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
NCollection_IndexedMap< TheKeyType, Hasher >::NCollection_IndexedMap ( const Standard_Integer  NbBuckets = 1,
const Handle< NCollection_BaseAllocator > &  theAllocator = 0L 
) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
NCollection_IndexedMap< TheKeyType, Hasher >::NCollection_IndexedMap ( const NCollection_IndexedMap< TheKeyType, Hasher > &  theOther) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
NCollection_IndexedMap< TheKeyType, Hasher >::~NCollection_IndexedMap ( void  ) [inline]

Member Function Documentation

template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
Standard_Integer NCollection_IndexedMap< TheKeyType, Hasher >::Add ( const TheKeyType &  theKey1) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
virtual void NCollection_IndexedMap< TheKeyType, Hasher >::Assign ( const NCollection_BaseCollection< TheKeyType > &  theOther) [inline, virtual]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
void NCollection_IndexedMap< TheKeyType, Hasher >::Clear ( const Standard_Boolean  doReleaseMemory = Standard_True) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
void NCollection_IndexedMap< TheKeyType, Hasher >::Clear ( const Handle< NCollection_BaseAllocator > &  theAllocator) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
Standard_Boolean NCollection_IndexedMap< TheKeyType, Hasher >::Contains ( const TheKeyType &  theKey1) const [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
Standard_Integer NCollection_IndexedMap< TheKeyType, Hasher >::FindIndex ( const TheKeyType &  theKey1) const [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
const TheKeyType& NCollection_IndexedMap< TheKeyType, Hasher >::FindKey ( const Standard_Integer  theKey2) const [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
const TheKeyType& NCollection_IndexedMap< TheKeyType, Hasher >::operator() ( const Standard_Integer  theKey2) const [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
NCollection_IndexedMap& NCollection_IndexedMap< TheKeyType, Hasher >::operator= ( const NCollection_IndexedMap< TheKeyType, Hasher > &  theOther) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
void NCollection_IndexedMap< TheKeyType, Hasher >::RemoveLast ( void  ) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
void NCollection_IndexedMap< TheKeyType, Hasher >::ReSize ( const Standard_Integer  N) [inline]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
virtual Standard_Integer NCollection_IndexedMap< TheKeyType, Hasher >::Size ( void  ) const [inline, virtual]
template<class TheKeyType, class Hasher = NCollection_DefaultHasher<TheKeyType>>
void NCollection_IndexedMap< TheKeyType, Hasher >::Substitute ( const Standard_Integer  theIndex,
const TheKeyType &  theKey1 
) [inline]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines