Purpose: An indexed map is used to store keys and to bind an index to them. More...
#include <SMESH_IndexedMap.hxx>
Classes | |
class | Iterator |
Public Member Functions | |
Standard_Integer | Add (const TheKeyType &theKey1) |
Add. More... | |
virtual void | Assign (const NCollection_BaseCollection< TheKeyType > &theOther) |
Assign another collection. More... | |
void | Clear (const Handle(NCollection_BaseAllocator)&theAllocator) |
Clear data and reset allocator. More... | |
void | Clear (const Standard_Boolean doReleaseMemory=Standard_True) |
Clear data. More... | |
Standard_Boolean | Contains (const TheKeyType &theKey1) const |
Contains. More... | |
Standard_Integer | FindIndex (const TheKeyType &theKey1) const |
FindIndex. More... | |
const TheKeyType & | FindKey (const Standard_Integer theKey2) const |
FindKey. More... | |
const TheKeyType & | operator() (const Standard_Integer theKey2) const |
operator () More... | |
SMESH_IndexedMap & | operator= (const SMESH_IndexedMap &theOther) |
= another map More... | |
void | RemoveLast (void) |
RemoveLast. More... | |
void | ReSize (const Standard_Integer N) |
ReSize. More... | |
virtual Standard_Integer | Size (void) const |
Size. More... | |
SMESH_IndexedMap (const SMESH_IndexedMap &theOther) | |
Copy constructor. More... | |
SMESH_IndexedMap (const Standard_Integer NbBuckets=1, const Handle(NCollection_BaseAllocator)&theAllocator=0L) | |
Constructor. More... | |
void | Substitute (const Standard_Integer theIndex, const TheKeyType &theKey1) |
Substitute. More... | |
~SMESH_IndexedMap (void) | |
Destructor. More... | |
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.
SMESH_IndexedMap< TheKeyType >::SMESH_IndexedMap | ( | const Standard_Integer | NbBuckets = 1 , |
const Handle(NCollection_BaseAllocator)& | theAllocator = 0L |
||
) |
Constructor.
SMESH_IndexedMap< TheKeyType >::SMESH_IndexedMap | ( | const SMESH_IndexedMap< TheKeyType > & | theOther | ) |
Copy constructor.
SMESH_IndexedMap< TheKeyType >::~SMESH_IndexedMap | ( | void | ) |
Destructor.
References SMESH_IndexedMap< TheKeyType >::Clear().
Standard_Integer SMESH_IndexedMap< TheKeyType >::Add | ( | const TheKeyType & | theKey1 | ) |
Add.
References SMESH_IndexedMap< TheKeyType >::ReSize().
Referenced by SMESH_IndexedMap< TheKeyType >::Assign().
|
virtual |
Assign another collection.
References SMESH_IndexedMap< TheKeyType >::Add(), SMESH_IndexedMap< TheKeyType >::Clear(), and SMESH_IndexedMap< TheKeyType >::ReSize().
void SMESH_IndexedMap< TheKeyType >::Clear | ( | const Handle(NCollection_BaseAllocator)& | theAllocator | ) |
Clear data and reset allocator.
References SMESH_IndexedMap< TheKeyType >::Clear().
void SMESH_IndexedMap< TheKeyType >::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.
Referenced by SMESH_IndexedMap< TheKeyType >::Assign(), SMESH_IndexedMap< TheKeyType >::Clear(), SMESH_IndexedMap< TheKeyType >::operator=(), and SMESH_IndexedMap< TheKeyType >::~SMESH_IndexedMap().
Standard_Boolean SMESH_IndexedMap< TheKeyType >::Contains | ( | const TheKeyType & | theKey1 | ) | const |
Contains.
Standard_Integer SMESH_IndexedMap< TheKeyType >::FindIndex | ( | const TheKeyType & | theKey1 | ) | const |
FindIndex.
const TheKeyType & SMESH_IndexedMap< TheKeyType >::FindKey | ( | const Standard_Integer | theKey2 | ) | const |
FindKey.
Referenced by SMESH_IndexedMap< TheKeyType >::operator()(), and SMESH_IndexedMap< TheKeyType >::Iterator::Value().
const TheKeyType & SMESH_IndexedMap< TheKeyType >::operator() | ( | const Standard_Integer | theKey2 | ) | const |
operator ()
References SMESH_IndexedMap< TheKeyType >::FindKey().
SMESH_IndexedMap & SMESH_IndexedMap< TheKeyType >::operator= | ( | const SMESH_IndexedMap< TheKeyType > & | theOther | ) |
= another map
References SMESH_IndexedMap< TheKeyType >::Clear(), and SMESH_IndexedMap< TheKeyType >::ReSize().
void SMESH_IndexedMap< TheKeyType >::RemoveLast | ( | void | ) |
RemoveLast.
void SMESH_IndexedMap< TheKeyType >::ReSize | ( | const Standard_Integer | N | ) |
ReSize.
Referenced by SMESH_IndexedMap< TheKeyType >::Add(), SMESH_IndexedMap< TheKeyType >::Assign(), and SMESH_IndexedMap< TheKeyType >::operator=().
|
virtual |
Size.
void SMESH_IndexedMap< TheKeyType >::Substitute | ( | const Standard_Integer | theIndex, |
const TheKeyType & | theKey1 | ||
) |
Substitute.