summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/Common/MyMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/7zip/unix/CPP/Common/MyMap.h')
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyMap.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libs/7zip/unix/CPP/Common/MyMap.h b/src/libs/7zip/unix/CPP/Common/MyMap.h
new file mode 100644
index 000000000..d0dd43f53
--- /dev/null
+++ b/src/libs/7zip/unix/CPP/Common/MyMap.h
@@ -0,0 +1,28 @@
+// MyMap.h
+
+#ifndef __COMMON_MYMAP_H
+#define __COMMON_MYMAP_H
+
+#include "MyVector.h"
+#include "Types.h"
+
+class CMap32
+{
+ struct CNode
+ {
+ UInt32 Key;
+ UInt32 Keys[2];
+ UInt32 Values[2];
+ UInt16 Len;
+ Byte IsLeaf[2];
+ };
+ CRecordVector<CNode> Nodes;
+
+public:
+
+ void Clear() { Nodes.Clear(); }
+ bool Find(UInt32 key, UInt32 &valueRes) const;
+ bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already
+};
+
+#endif