aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyMap.h
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2021-12-27 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2022-03-18 15:35:13 +0500
commitf19f813537c7aea1c20749c914e756b54a9c3cf5 (patch)
tree816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Common/MyMap.h
parent98e06a519b63b81986abe76d28887f6984a7732b (diff)
download7zip-21.07.tar.gz
7zip-21.07.tar.bz2
7zip-21.07.zip
'21.07'21.07
Diffstat (limited to '')
-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