aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Common/MyMap.h')
-rw-r--r--CPP/Common/MyMap.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/CPP/Common/MyMap.h b/CPP/Common/MyMap.h
new file mode 100644
index 0000000..cbcbadd
--- /dev/null
+++ b/CPP/Common/MyMap.h
@@ -0,0 +1,28 @@
1// MyMap.h
2
3#ifndef __COMMON_MYMAP_H
4#define __COMMON_MYMAP_H
5
6#include "MyTypes.h"
7#include "MyVector.h"
8
9class 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
21public:
22
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