aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyTypes.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/MyTypes.h
parent98e06a519b63b81986abe76d28887f6984a7732b (diff)
download7zip-21.07.tar.gz
7zip-21.07.tar.bz2
7zip-21.07.zip
'21.07'21.07
Diffstat (limited to 'CPP/Common/MyTypes.h')
-rw-r--r--CPP/Common/MyTypes.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/CPP/Common/MyTypes.h b/CPP/Common/MyTypes.h
new file mode 100644
index 0000000..71b8e7f
--- /dev/null
+++ b/CPP/Common/MyTypes.h
@@ -0,0 +1,52 @@
1// Common/MyTypes.h
2
3#ifndef __COMMON_MY_TYPES_H
4#define __COMMON_MY_TYPES_H
5
6#include "../../C/7zTypes.h"
7
8typedef int HRes;
9
10struct CBoolPair
11{
12 bool Val;
13 bool Def;
14
15 CBoolPair(): Val(false), Def(false) {}
16
17 void Init()
18 {
19 Val = false;
20 Def = false;
21 }
22
23 void SetTrueTrue()
24 {
25 Val = true;
26 Def = true;
27 }
28
29 void SetVal_as_Defined(bool val)
30 {
31 Val = val;
32 Def = true;
33 }
34};
35
36#define CLASS_NO_COPY(cls) \
37 private: \
38 cls(const cls &); \
39 cls &operator=(const cls &);
40
41class CUncopyable
42{
43protected:
44 CUncopyable() {} // allow constructor
45 // ~CUncopyable() {}
46CLASS_NO_COPY(CUncopyable)
47};
48
49#define MY_UNCOPYABLE :private CUncopyable
50// #define MY_UNCOPYABLE
51
52#endif