1 // MyMap.h 2 3 #ifndef ZIP7_INC_COMMON_MY_MAP_H 4 #define ZIP7_INC_COMMON_MY_MAP_H 5 6 #include "MyTypes.h" 7 #include "MyVector.h" 8 9 class CMap32 10 { 11 struct CNode 12 { 13 UInt32 Key; 14 UInt32 Keys[2]; 15 UInt32 Values[2]; 16 UInt16 Len; 17 Byte IsLeaf[2]; 18 }; 19 CRecordVector<CNode> Nodes; 20 21 public: 22 Clear()23 void Clear() { Nodes.Clear(); } 24 bool Find(UInt32 key, UInt32 &valueRes) const throw(); 25 bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already 26 }; 27 28 #endif 29