diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/CPP/Common/MyMap.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,28 @@
     1.4 +// MyMap.h
     1.5 +
     1.6 +#ifndef __COMMON_MYMAP_H
     1.7 +#define __COMMON_MYMAP_H
     1.8 +
     1.9 +#include "MyVector.h"
    1.10 +#include "Types.h"
    1.11 +
    1.12 +class CMap32
    1.13 +{
    1.14 +  struct CNode
    1.15 +  {
    1.16 +    UInt32 Key;
    1.17 +    UInt32 Keys[2];
    1.18 +    UInt32 Values[2];
    1.19 +    UInt16 Len;
    1.20 +    Byte IsLeaf[2];
    1.21 +  };
    1.22 +  CRecordVector<CNode> Nodes;
    1.23 +
    1.24 +public:
    1.25 +
    1.26 +  void Clear() { Nodes.Clear(); }
    1.27 +  bool Find(UInt32 key, UInt32 &valueRes) const;
    1.28 +  bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already
    1.29 +};
    1.30 +
    1.31 +#endif