Open CASCADE Technology
6.9.0
|
#include <NCollection_IndexedMap.hxx>
Data Structures | |
class | Iterator |
Public Types | |
typedef NCollection_StlIterator < std::forward_iterator_tag, Iterator, TheKeyType, true > | const_iterator |
Shorthand for a constant iterator type. More... | |
Public Member Functions | |
const_iterator | cbegin () const |
Returns a const iterator pointing to the first element in the map. More... | |
const_iterator | cend () const |
Returns a const iterator referring to the past-the-end element in the map. More... | |
NCollection_IndexedMap (const Standard_Integer NbBuckets=1, const Handle< NCollection_BaseAllocator > &theAllocator=0L) | |
Constructor. More... | |
NCollection_IndexedMap (const NCollection_IndexedMap &theOther) | |
Copy constructor. More... | |
void | Exchange (NCollection_IndexedMap &theOther) |
Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well! More... | |
NCollection_IndexedMap & | Assign (const NCollection_IndexedMap &theOther) |
Assign. This method does not change the internal allocator. More... | |
NCollection_IndexedMap & | operator= (const NCollection_IndexedMap &theOther) |
Assignment operator. More... | |
void | ReSize (const Standard_Integer N) |
ReSize. More... | |
Standard_Integer | Add (const TheKeyType &theKey1) |
Add. More... | |
Standard_Boolean | Contains (const TheKeyType &theKey1) const |
Contains. More... | |
void | Substitute (const Standard_Integer theIndex, const TheKeyType &theKey1) |
Substitute. More... | |
void | RemoveLast (void) |
RemoveLast. More... | |
const TheKeyType & | FindKey (const Standard_Integer theKey2) const |
FindKey. More... | |
const TheKeyType & | operator() (const Standard_Integer theKey2) const |
operator () More... | |
Standard_Integer | FindIndex (const TheKeyType &theKey1) const |
FindIndex. More... | |
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. More... | |
void | Clear (const Handle< NCollection_BaseAllocator > &theAllocator) |
Clear data and reset allocator. More... | |
~NCollection_IndexedMap (void) | |
Destructor. More... | |
Standard_Integer | Size (void) const |
Size. More... | |
Public Member Functions inherited from NCollection_BaseMap | |
Standard_Integer | NbBuckets () const |
NbBuckets. More... | |
Standard_Integer | Extent () const |
Extent. More... | |
Standard_Boolean | IsEmpty () const |
IsEmpty. More... | |
void | Statistics (Standard_OStream &S) const |
Statistics. 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.
typedef NCollection_StlIterator<std::forward_iterator_tag, Iterator, TheKeyType, true> NCollection_IndexedMap< TheKeyType, Hasher >::const_iterator |
Shorthand for a constant iterator type.
|
inline |
Constructor.
|
inline |
Copy constructor.
|
inline |
Destructor.
|
inline |
Add.
|
inline |
Assign. This method does not change the internal allocator.
|
inline |
Returns a const iterator pointing to the first element in the map.
|
inline |
Returns a const iterator referring to the past-the-end element in the map.
|
inline |
Clear data. If doReleaseMemory is false then the table of buckets is not released and will be reused.
|
inline |
Clear data and reset allocator.
|
inline |
Contains.
|
inline |
Exchange the content of two maps without re-allocations. Notice that allocators will be swapped as well!
|
inline |
FindIndex.
|
inline |
FindKey.
|
inline |
operator ()
|
inline |
Assignment operator.
|
inline |
RemoveLast.
|
inline |
ReSize.
|
inline |
Size.
|
inline |
Substitute.