view src/win32/7zip/7z/CPP/Common/MyMap.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line source
1 // MyMap.h
3 #ifndef __COMMON_MYMAP_H
4 #define __COMMON_MYMAP_H
6 #include "MyVector.h"
7 #include "Types.h"
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;
21 public:
23 void Clear() { Nodes.Clear(); }
24 bool Find(UInt32 key, UInt32 &valueRes) const;
25 bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already
26 };
28 #endif