comparison 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
comparison
equal deleted inserted replaced
0:8ced16adf2e1 1:f9f4f1b99eed
1 // MyMap.h
2
3 #ifndef __COMMON_MYMAP_H
4 #define __COMMON_MYMAP_H
5
6 #include "MyVector.h"
7 #include "Types.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
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 };
27
28 #endif