blob: 2b1acce20212fe6cf998066353f35c54b7bb72f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Common/MyTypes.h
#ifndef __COMMON_MY_TYPES_H
#define __COMMON_MY_TYPES_H
#include "../../C/7zTypes.h"
typedef int HRes;
struct CBoolPair
{
bool Val;
bool Def;
CBoolPair(): Val(false), Def(false) {}
void Init()
{
Val = false;
Def = false;
}
void SetTrueTrue()
{
Val = true;
Def = true;
}
};
#define CLASS_NO_COPY(cls) \
private: \
cls(const cls &); \
cls &operator=(const cls &);
class CUncopyable
{
protected:
CUncopyable() {} // allow constructor
// ~CUncopyable() {}
CLASS_NO_COPY(CUncopyable)
};
#define MY_UNCOPYABLE :private CUncopyable
// #define MY_UNCOPYABLE
#endif
|