rlm@1: // MyMap.h rlm@1: rlm@1: #ifndef __COMMON_MYMAP_H rlm@1: #define __COMMON_MYMAP_H rlm@1: rlm@1: #include "MyVector.h" rlm@1: #include "Types.h" rlm@1: rlm@1: class CMap32 rlm@1: { rlm@1: struct CNode rlm@1: { rlm@1: UInt32 Key; rlm@1: UInt32 Keys[2]; rlm@1: UInt32 Values[2]; rlm@1: UInt16 Len; rlm@1: Byte IsLeaf[2]; rlm@1: }; rlm@1: CRecordVector Nodes; rlm@1: rlm@1: public: rlm@1: rlm@1: void Clear() { Nodes.Clear(); } rlm@1: bool Find(UInt32 key, UInt32 &valueRes) const; rlm@1: bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already rlm@1: }; rlm@1: rlm@1: #endif