1 // File: NCollection_DefineIndexedDataMap.hxx
2 // Created: Thu Apr 24 15:02:53 2002
3 // Author: Alexander KARTOMIN (akm)
4 // <akm@opencascade.com>
6 // Purpose: An indexed map is used to store keys and to bind
7 // an index to them. Each new key stored in the map
8 // gets an index. Index are incremented as keys are
9 // stored in the map. A key can be found by the index
10 // and an index by the key. No key but the last can
11 // be removed so the indices are in the range 1..
12 // Extent. An Item is stored with each key.
14 // This class is similar to IndexedMap from
15 // NCollection with the Item as a new feature. Note
16 // the important difference on the operator (). In
17 // the IndexedMap this operator returns the Key. In
18 // the IndexedDataMap this operator returns the Item.
20 // See the class Map from NCollection for a
21 // discussion about the number of buckets.
24 #ifndef NCollection_DefineIndexedDataMap_HeaderFile
25 #define NCollection_DefineIndexedDataMap_HeaderFile
27 #include <NCollection_DefineBaseCollection.hxx>
28 #include <NCollection_IndexedDataMap.hxx>
30 // *********************************************** Class IndexedDataMap ******
32 #define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
33 typedef NCollection_IndexedDataMap <TheKeyType, TheItemType > _ClassName_;