mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 13:14:59 -06:00
53 lines
710 B
C++
53 lines
710 B
C++
// 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;
|
|
}
|
|
|
|
void SetVal_as_Defined(bool val)
|
|
{
|
|
Val = val;
|
|
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
|