Imported Upstream version 9.20
[platform/upstream/7zip.git] / CPP / 7zip / Archive / 7z / 7zCompressionMode.h
1 // 7zCompressionMode.h\r
2 \r
3 #ifndef __7Z_COMPRESSION_MODE_H\r
4 #define __7Z_COMPRESSION_MODE_H\r
5 \r
6 #include "../../../Common/MyString.h"\r
7 \r
8 #include "../../../Windows/PropVariant.h"\r
9 \r
10 #include "../../Common/MethodProps.h"\r
11 \r
12 namespace NArchive {\r
13 namespace N7z {\r
14 \r
15 struct CMethodFull: public CMethod\r
16 {\r
17   UInt32 NumInStreams;\r
18   UInt32 NumOutStreams;\r
19   bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); }\r
20 };\r
21 \r
22 struct CBind\r
23 {\r
24   UInt32 InCoder;\r
25   UInt32 InStream;\r
26   UInt32 OutCoder;\r
27   UInt32 OutStream;\r
28 };\r
29 \r
30 struct CCompressionMethodMode\r
31 {\r
32   CObjectVector<CMethodFull> Methods;\r
33   CRecordVector<CBind> Binds;\r
34   #ifndef _7ZIP_ST\r
35   UInt32 NumThreads;\r
36   #endif\r
37   bool PasswordIsDefined;\r
38   UString Password;\r
39 \r
40   bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); }\r
41   CCompressionMethodMode(): PasswordIsDefined(false)\r
42       #ifndef _7ZIP_ST\r
43       , NumThreads(1)\r
44       #endif\r
45   {}\r
46 };\r
47 \r
48 }}\r
49 \r
50 #endif\r