Disable copy constructors and copy assignment operators

This commit is contained in:
Birunthan Mohanathas 2014-01-05 12:07:22 +02:00
parent 4b6a1d31ea
commit 7164dddefd
54 changed files with 157 additions and 18 deletions

View File

@ -42,6 +42,8 @@ class __declspec(novtable) Canvas
public: public:
virtual ~Canvas(); virtual ~Canvas();
Canvas(const Canvas& other) = delete;
// Creates the canvas using the specified rendering engine. May return nullptr. // Creates the canvas using the specified rendering engine. May return nullptr.
static Canvas* Create(Renderer renderer); static Canvas* Create(Renderer renderer);
@ -108,9 +110,6 @@ protected:
// the default DirectWrite output. Otherwise, the expected result should be similar to that of // the default DirectWrite output. Otherwise, the expected result should be similar to that of
// non-typographic GDI+. // non-typographic GDI+.
bool m_AccurateText; bool m_AccurateText;
private:
Canvas(const Canvas& other) {}
}; };
} // namespace Gfx } // namespace Gfx

View File

@ -82,7 +82,9 @@ private:
CanvasD2D(); CanvasD2D();
~CanvasD2D(); ~CanvasD2D();
CanvasD2D(const CanvasD2D& other) {}
CanvasD2D(const CanvasD2D& other) = delete;
CanvasD2D& operator=(CanvasD2D other) = delete;
bool BeginTargetDraw(); bool BeginTargetDraw();
void EndTargetDraw(); void EndTargetDraw();

View File

@ -71,7 +71,9 @@ private:
CanvasGDIP(); CanvasGDIP();
~CanvasGDIP(); ~CanvasGDIP();
CanvasGDIP(const CanvasGDIP& other) {}
CanvasGDIP(const CanvasGDIP& other) = delete;
CanvasGDIP& operator=(CanvasGDIP other) = delete;
void Dispose(); void Dispose();

View File

@ -29,14 +29,13 @@ class __declspec(novtable) FontCollection
public: public:
virtual ~FontCollection(); virtual ~FontCollection();
FontCollection(const FontCollection& other) = delete;
// Adds a file to the collection. Returns true if the file was successfully added. // Adds a file to the collection. Returns true if the file was successfully added.
virtual bool AddFile(const WCHAR* file) = 0; virtual bool AddFile(const WCHAR* file) = 0;
protected: protected:
FontCollection(); FontCollection();
private:
FontCollection(const FontCollection& other) {}
}; };
} // namespace Gfx } // namespace Gfx

View File

@ -31,6 +31,9 @@ class FontCollectionD2D final : public FontCollection
public: public:
virtual ~FontCollectionD2D(); virtual ~FontCollectionD2D();
FontCollectionD2D(const FontCollectionD2D& other) = delete;
FontCollectionD2D& operator=(FontCollectionD2D other) = delete;
virtual bool AddFile(const WCHAR* file) override; virtual bool AddFile(const WCHAR* file) override;
protected: protected:
@ -40,8 +43,6 @@ private:
friend class CanvasD2D; friend class CanvasD2D;
friend class TextFormatD2D; friend class TextFormatD2D;
FontCollectionD2D(const FontCollectionD2D& other) {}
void Dispose(); void Dispose();
bool InitializeCollection(); bool InitializeCollection();

View File

@ -33,6 +33,9 @@ class FontCollectionGDIP final : public FontCollection
public: public:
virtual ~FontCollectionGDIP(); virtual ~FontCollectionGDIP();
FontCollectionGDIP(const FontCollectionGDIP& other) = delete;
FontCollectionGDIP& operator=(FontCollectionGDIP other) = delete;
virtual bool AddFile(const WCHAR* file) override; virtual bool AddFile(const WCHAR* file) override;
protected: protected:
@ -42,8 +45,6 @@ private:
friend class CanvasGDIP; friend class CanvasGDIP;
friend class TextFormatGDIP; friend class TextFormatGDIP;
FontCollectionGDIP(const FontCollectionGDIP& other) {}
void Dispose(); void Dispose();
Gdiplus::PrivateFontCollection* m_PrivateCollection; Gdiplus::PrivateFontCollection* m_PrivateCollection;

View File

@ -45,6 +45,8 @@ class __declspec(novtable) TextFormat
public: public:
virtual ~TextFormat(); virtual ~TextFormat();
TextFormat(const TextFormat& other) = delete;
// Returns true if this TextFormat object is valid for use in draw operations. // Returns true if this TextFormat object is valid for use in draw operations.
virtual bool IsInitialized() const = 0; virtual bool IsInitialized() const = 0;
@ -69,8 +71,6 @@ protected:
TextFormat(); TextFormat();
private: private:
TextFormat(const TextFormat& other) {}
HorizontalAlignment m_HorizontalAlignment; HorizontalAlignment m_HorizontalAlignment;
VerticalAlignment m_VerticalAlignment; VerticalAlignment m_VerticalAlignment;
}; };

View File

@ -33,6 +33,9 @@ public:
TextFormatD2D(); TextFormatD2D();
virtual ~TextFormatD2D(); virtual ~TextFormatD2D();
TextFormatD2D(const TextFormatD2D& other) = delete;
TextFormatD2D& operator=(TextFormatD2D other) = delete;
virtual bool IsInitialized() const override { return m_TextFormat != nullptr; } virtual bool IsInitialized() const override { return m_TextFormat != nullptr; }
virtual void SetProperties( virtual void SetProperties(
@ -49,8 +52,6 @@ private:
friend class Common_Gfx_TextFormatD2D_Test; friend class Common_Gfx_TextFormatD2D_Test;
TextFormatD2D(const TextFormatD2D& other) {}
void Dispose(); void Dispose();
// Creates a new DirectWrite text layout if |str| has changed since last call. Since creating // Creates a new DirectWrite text layout if |str| has changed since last call. Since creating

View File

@ -33,6 +33,9 @@ public:
TextFormatGDIP(); TextFormatGDIP();
virtual ~TextFormatGDIP(); virtual ~TextFormatGDIP();
TextFormatGDIP(const TextFormatGDIP& other) = delete;
TextFormatGDIP& operator=(TextFormatGDIP other) = delete;
virtual bool IsInitialized() const override { return m_Font != nullptr; } virtual bool IsInitialized() const override { return m_Font != nullptr; }
virtual void SetProperties( virtual void SetProperties(
@ -47,8 +50,6 @@ public:
private: private:
friend class CanvasGDIP; friend class CanvasGDIP;
TextFormatGDIP(const TextFormatGDIP& other) {}
std::unique_ptr<Gdiplus::Font> m_Font; std::unique_ptr<Gdiplus::Font> m_Font;
std::unique_ptr<Gdiplus::FontFamily> m_FontFamily; std::unique_ptr<Gdiplus::FontFamily> m_FontFamily;
Gdiplus::StringFormat m_StringFormat; Gdiplus::StringFormat m_StringFormat;

View File

@ -36,6 +36,9 @@ public:
WICBitmapDIB(); WICBitmapDIB();
~WICBitmapDIB(); ~WICBitmapDIB();
WICBitmapDIB(const WICBitmapDIB& other) = delete;
WICBitmapDIB& operator=(WICBitmapDIB other) = delete;
void Resize(UINT w, UINT h); void Resize(UINT w, UINT h);
HBITMAP GetHandle() const { return m_DIBSectionBuffer; } HBITMAP GetHandle() const { return m_DIBSectionBuffer; }

View File

@ -48,6 +48,9 @@ public:
IFACEMETHOD(GetPixelFormat)(WICPixelFormatGUID* pPixelFormat); IFACEMETHOD(GetPixelFormat)(WICPixelFormatGUID* pPixelFormat);
private: private:
WICBitmapLockDIB(const WICBitmapLockDIB& other) = delete;
WICBitmapLockDIB& operator=(WICBitmapLockDIB other) = delete;
WICBitmapDIB* m_Bitmap; WICBitmapDIB* m_Bitmap;
const WICRect* m_Rect; const WICRect* m_Rect;
UINT m_RefCount; UINT m_RefCount;

View File

@ -48,6 +48,9 @@ public:
IFACEMETHOD(GetPixelFormat)(WICPixelFormatGUID* pPixelFormat); IFACEMETHOD(GetPixelFormat)(WICPixelFormatGUID* pPixelFormat);
private: private:
WICBitmapLockGDIP(const WICBitmapLockGDIP& other) = delete;
WICBitmapLockGDIP& operator=(WICBitmapLockGDIP other) = delete;
Gdiplus::BitmapData m_BitmapData; Gdiplus::BitmapData m_BitmapData;
UINT m_RefCount; UINT m_RefCount;
}; };

View File

@ -42,6 +42,9 @@ public:
ConfigParser(); ConfigParser();
~ConfigParser(); ~ConfigParser();
ConfigParser(const ConfigParser& other) = delete;
ConfigParser& operator=(ConfigParser other) = delete;
void Initialize(const std::wstring& filename, MeterWindow* meterWindow = nullptr, LPCTSTR skinSection = nullptr, const std::wstring* resourcePath = nullptr); void Initialize(const std::wstring& filename, MeterWindow* meterWindow = nullptr, LPCTSTR skinSection = nullptr, const std::wstring* resourcePath = nullptr);
void AddMeasure(Measure* pMeasure); void AddMeasure(Measure* pMeasure);

View File

@ -29,6 +29,9 @@ class ContextMenu
public: public:
ContextMenu(); ContextMenu();
ContextMenu(const ContextMenu& other) = delete;
ContextMenu& operator=(ContextMenu other) = delete;
bool IsMenuActive() { return m_MenuActive; } bool IsMenuActive() { return m_MenuActive; }
void ShowMenu(POINT pos, MeterWindow* meterWindow); void ShowMenu(POINT pos, MeterWindow* meterWindow);

View File

@ -29,6 +29,9 @@ public:
DialogAbout(); DialogAbout();
virtual ~DialogAbout(); virtual ~DialogAbout();
DialogAbout(const DialogAbout& other) = delete;
DialogAbout& operator=(DialogAbout other) = delete;
static Dialog* GetDialog() { return c_Dialog; } static Dialog* GetDialog() { return c_Dialog; }
static void Open(int tab = 0); static void Open(int tab = 0);

View File

@ -28,6 +28,9 @@ public:
DialogManage(); DialogManage();
virtual ~DialogManage(); virtual ~DialogManage();
DialogManage(const DialogManage& other) = delete;
DialogManage& operator=(DialogManage other) = delete;
static Dialog* GetDialog() { return c_Dialog; } static Dialog* GetDialog() { return c_Dialog; }
static void Open(const WCHAR* tabName, const WCHAR* param1, const WCHAR* param2); static void Open(const WCHAR* tabName, const WCHAR* param1, const WCHAR* param2);

View File

@ -27,6 +27,9 @@ class __declspec(novtable) Group
public: public:
virtual ~Group() {} virtual ~Group() {}
Group(const Group& other) = delete;
Group& operator=(Group other) = delete;
bool BelongsToGroup(const std::wstring& group) const; bool BelongsToGroup(const std::wstring& group) const;
protected: protected:

View File

@ -63,6 +63,9 @@ public:
IfActions(); IfActions();
~IfActions(); ~IfActions();
IfActions(const IfActions& other) = delete;
IfActions& operator=(IfActions other) = delete;
void ReadOptions(ConfigParser& parser, const WCHAR* section); void ReadOptions(ConfigParser& parser, const WCHAR* section);
void ReadConditionOptions(ConfigParser& parser, const WCHAR* section); void ReadConditionOptions(ConfigParser& parser, const WCHAR* section);
void DoIfActions(Measure& measure, double value); void DoIfActions(Measure& measure, double value);

View File

@ -77,6 +77,9 @@ private:
Logger(); Logger();
~Logger(); ~Logger();
Logger(const Logger& other) = delete;
Logger& operator=(Logger other) = delete;
bool m_LogToFile; bool m_LogToFile;
std::wstring m_LogFilePath; std::wstring m_LogFilePath;

View File

@ -58,6 +58,8 @@ class __declspec(novtable) Measure : public Section
public: public:
virtual ~Measure(); virtual ~Measure();
Measure(const Measure& other) = delete;
void ReadOptions(ConfigParser& parser) { ReadOptions(parser, GetName()); } void ReadOptions(ConfigParser& parser) { ReadOptions(parser, GetName()); }
virtual void Initialize(); virtual void Initialize();

View File

@ -29,6 +29,9 @@ public:
MeasureCPU(MeterWindow* meterWindow, const WCHAR* name); MeasureCPU(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureCPU(); virtual ~MeasureCPU();
MeasureCPU(const MeasureCPU& other) = delete;
MeasureCPU& operator=(MeasureCPU other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureCPU>(); } virtual UINT GetTypeID() { return TypeID<MeasureCPU>(); }
static void InitializeStatic(); static void InitializeStatic();

View File

@ -27,6 +27,9 @@ public:
MeasureCalc(MeterWindow* meterWindow, const WCHAR* name); MeasureCalc(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureCalc(); virtual ~MeasureCalc();
MeasureCalc(const MeasureCalc& other) = delete;
MeasureCalc& operator=(MeasureCalc other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureCalc>(); } virtual UINT GetTypeID() { return TypeID<MeasureCalc>(); }
protected: protected:

View File

@ -27,6 +27,9 @@ public:
MeasureDiskSpace(MeterWindow* meterWindow, const WCHAR* name); MeasureDiskSpace(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureDiskSpace(); virtual ~MeasureDiskSpace();
MeasureDiskSpace(const MeasureDiskSpace& other) = delete;
MeasureDiskSpace& operator=(MeasureDiskSpace other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureDiskSpace>(); } virtual UINT GetTypeID() { return TypeID<MeasureDiskSpace>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureMemory(MeterWindow* meterWindow, const WCHAR* name); MeasureMemory(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureMemory(); virtual ~MeasureMemory();
MeasureMemory(const MeasureMemory& other) = delete;
MeasureMemory& operator=(MeasureMemory other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureMemory>(); } virtual UINT GetTypeID() { return TypeID<MeasureMemory>(); }
protected: protected:

View File

@ -53,6 +53,9 @@ protected:
MeasureNet(MeterWindow* meterWindow, const WCHAR* name, NET type); MeasureNet(MeterWindow* meterWindow, const WCHAR* name, NET type);
virtual ~MeasureNet(); virtual ~MeasureNet();
MeasureNet(const MeasureNet& other) = delete;
MeasureNet& operator=(MeasureNet other) = delete;
virtual void ReadOptions(ConfigParser& parser, const WCHAR* section); virtual void ReadOptions(ConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();

View File

@ -26,6 +26,9 @@ class MeasureNetIn : public MeasureNet
public: public:
MeasureNetIn(MeterWindow* meterWindow, const WCHAR* name); MeasureNetIn(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureNetIn(); virtual ~MeasureNetIn();
MeasureNetIn(const MeasureNetIn& other) = delete;
MeasureNetIn& operator=(MeasureNetIn other) = delete;
}; };
#endif #endif

View File

@ -26,6 +26,9 @@ class MeasureNetOut : public MeasureNet
public: public:
MeasureNetOut(MeterWindow* meterWindow, const WCHAR* name); MeasureNetOut(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureNetOut(); virtual ~MeasureNetOut();
MeasureNetOut(const MeasureNetOut& other) = delete;
MeasureNetOut& operator=(MeasureNetOut other) = delete;
}; };
#endif #endif

View File

@ -26,6 +26,9 @@ class MeasureNetTotal : public MeasureNet
public: public:
MeasureNetTotal(MeterWindow* meterWindow, const WCHAR* name); MeasureNetTotal(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureNetTotal(); virtual ~MeasureNetTotal();
MeasureNetTotal(const MeasureNetTotal& other) = delete;
MeasureNetTotal& operator=(MeasureNetTotal other) = delete;
}; };
#endif #endif

View File

@ -27,6 +27,9 @@ public:
MeasurePhysicalMemory(MeterWindow* meterWindow, const WCHAR* name); MeasurePhysicalMemory(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasurePhysicalMemory(); virtual ~MeasurePhysicalMemory();
MeasurePhysicalMemory(const MeasurePhysicalMemory& other) = delete;
MeasurePhysicalMemory& operator=(MeasurePhysicalMemory other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasurePhysicalMemory>(); } virtual UINT GetTypeID() { return TypeID<MeasurePhysicalMemory>(); }
protected: protected:

View File

@ -42,6 +42,9 @@ public:
MeasurePlugin(MeterWindow* meterWindow, const WCHAR* name); MeasurePlugin(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasurePlugin(); virtual ~MeasurePlugin();
MeasurePlugin(const MeasurePlugin& other) = delete;
MeasurePlugin& operator=(MeasurePlugin other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasurePlugin>(); } virtual UINT GetTypeID() { return TypeID<MeasurePlugin>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureRegistry(MeterWindow* meterWindow, const WCHAR* name); MeasureRegistry(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureRegistry(); virtual ~MeasureRegistry();
MeasureRegistry(const MeasureRegistry& other) = delete;
MeasureRegistry& operator=(MeasureRegistry other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureRegistry>(); } virtual UINT GetTypeID() { return TypeID<MeasureRegistry>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureScript(MeterWindow* meterWindow, const WCHAR* name); MeasureScript(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureScript(); virtual ~MeasureScript();
MeasureScript(const MeasureScript& other) = delete;
MeasureScript& operator=(MeasureScript other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureScript>(); } virtual UINT GetTypeID() { return TypeID<MeasureScript>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureString(MeterWindow* meterWindow, const WCHAR* name); MeasureString(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureString(); virtual ~MeasureString();
MeasureString(const MeasureString& other) = delete;
MeasureString& operator=(MeasureString other) = delete;
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();
virtual UINT GetTypeID() { return TypeID<MeasureString>(); } virtual UINT GetTypeID() { return TypeID<MeasureString>(); }

View File

@ -27,6 +27,9 @@ public:
MeasureTime(MeterWindow* meterWindow, const WCHAR* name); MeasureTime(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureTime(); virtual ~MeasureTime();
MeasureTime(const MeasureTime& other) = delete;
MeasureTime& operator=(MeasureTime other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureTime>(); } virtual UINT GetTypeID() { return TypeID<MeasureTime>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureUptime(MeterWindow* meterWindow, const WCHAR* name); MeasureUptime(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureUptime(); virtual ~MeasureUptime();
MeasureUptime(const MeasureUptime& other) = delete;
MeasureUptime& operator=(MeasureUptime other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureUptime>(); } virtual UINT GetTypeID() { return TypeID<MeasureUptime>(); }
virtual const WCHAR* GetStringValue(); virtual const WCHAR* GetStringValue();

View File

@ -27,6 +27,9 @@ public:
MeasureVirtualMemory(MeterWindow* meterWindow, const WCHAR* name); MeasureVirtualMemory(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeasureVirtualMemory(); virtual ~MeasureVirtualMemory();
MeasureVirtualMemory(const MeasureVirtualMemory& other) = delete;
MeasureVirtualMemory& operator=(MeasureVirtualMemory other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureVirtualMemory>(); } virtual UINT GetTypeID() { return TypeID<MeasureVirtualMemory>(); }
protected: protected:

View File

@ -37,6 +37,8 @@ class __declspec(novtable) Meter : public Section
public: public:
virtual ~Meter(); virtual ~Meter();
Meter(const Meter& other) = delete;
void ReadOptions(ConfigParser& parser) { ReadOptions(parser, GetName()); parser.ClearStyleTemplate(); } void ReadOptions(ConfigParser& parser) { ReadOptions(parser, GetName()); parser.ClearStyleTemplate(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -28,6 +28,9 @@ public:
MeterBar(MeterWindow* meterWindow, const WCHAR* name); MeterBar(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterBar(); virtual ~MeterBar();
MeterBar(const MeterBar& other) = delete;
MeterBar& operator=(MeterBar other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterBar>(); } virtual UINT GetTypeID() { return TypeID<MeterBar>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -28,6 +28,9 @@ public:
MeterBitmap(MeterWindow* meterWindow, const WCHAR* name); MeterBitmap(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterBitmap(); virtual ~MeterBitmap();
MeterBitmap(const MeterBitmap& other) = delete;
MeterBitmap& operator=(MeterBitmap other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterBitmap>(); } virtual UINT GetTypeID() { return TypeID<MeterBitmap>(); }
virtual bool HitTest(int x, int y); virtual bool HitTest(int x, int y);

View File

@ -30,6 +30,9 @@ public:
MeterButton(MeterWindow* meterWindow, const WCHAR* name); MeterButton(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterButton(); virtual ~MeterButton();
MeterButton(const MeterButton& other) = delete;
MeterButton& operator=(MeterButton other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterButton>(); } virtual UINT GetTypeID() { return TypeID<MeterButton>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -28,6 +28,9 @@ public:
MeterHistogram(MeterWindow* meterWindow, const WCHAR* name); MeterHistogram(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterHistogram(); virtual ~MeterHistogram();
MeterHistogram(const MeterHistogram& other) = delete;
MeterHistogram& operator=(MeterHistogram other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterHistogram>(); } virtual UINT GetTypeID() { return TypeID<MeterHistogram>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -28,6 +28,9 @@ public:
MeterImage(MeterWindow* meterWindow, const WCHAR* name); MeterImage(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterImage(); virtual ~MeterImage();
MeterImage(const MeterImage& other) = delete;
MeterImage& operator=(MeterImage other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterImage>(); } virtual UINT GetTypeID() { return TypeID<MeterImage>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -27,6 +27,9 @@ public:
MeterLine(MeterWindow* meterWindow, const WCHAR* name); MeterLine(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterLine(); virtual ~MeterLine();
MeterLine(const MeterLine& other) = delete;
MeterLine& operator=(MeterLine other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterLine>(); } virtual UINT GetTypeID() { return TypeID<MeterLine>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -28,6 +28,9 @@ public:
MeterRotator(MeterWindow* meterWindow, const WCHAR* name); MeterRotator(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterRotator(); virtual ~MeterRotator();
MeterRotator(const MeterRotator& other) = delete;
MeterRotator& operator=(MeterRotator other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterRotator>(); } virtual UINT GetTypeID() { return TypeID<MeterRotator>(); }
virtual void Initialize(); virtual void Initialize();

View File

@ -27,6 +27,9 @@ public:
MeterRoundLine(MeterWindow* meterWindow, const WCHAR* name); MeterRoundLine(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterRoundLine(); virtual ~MeterRoundLine();
MeterRoundLine(const MeterRoundLine& other) = delete;
MeterRoundLine& operator=(MeterRoundLine other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterRoundLine>(); } virtual UINT GetTypeID() { return TypeID<MeterRoundLine>(); }
virtual bool Update(); virtual bool Update();

View File

@ -29,6 +29,9 @@ public:
MeterString(MeterWindow* meterWindow, const WCHAR* name); MeterString(MeterWindow* meterWindow, const WCHAR* name);
virtual ~MeterString(); virtual ~MeterString();
MeterString(const MeterString& other) = delete;
MeterString& operator=(MeterString other) = delete;
virtual UINT GetTypeID() { return TypeID<MeterString>(); } virtual UINT GetTypeID() { return TypeID<MeterString>(); }
virtual int GetX(bool abs = false); virtual int GetX(bool abs = false);

View File

@ -115,6 +115,9 @@ public:
MeterWindow(const std::wstring& folderPath, const std::wstring& file); MeterWindow(const std::wstring& folderPath, const std::wstring& file);
~MeterWindow(); ~MeterWindow();
MeterWindow(const MeterWindow& other) = delete;
MeterWindow& operator=(MeterWindow other) = delete;
void Initialize(); void Initialize();
void DoBang(Bang bang, const std::vector<std::wstring>& args); void DoBang(Bang bang, const std::vector<std::wstring>& args);

View File

@ -66,6 +66,9 @@ public:
Mouse(MeterWindow* meterWindow, Meter* meter = nullptr); Mouse(MeterWindow* meterWindow, Meter* meter = nullptr);
~Mouse(); ~Mouse();
Mouse(const Mouse& other) = delete;
Mouse& operator=(Mouse other) = delete;
void ReadOptions(ConfigParser& parser, const WCHAR* section); void ReadOptions(ConfigParser& parser, const WCHAR* section);
MOUSECURSOR GetCursorType() const { return m_CursorType; } MOUSECURSOR GetCursorType() const { return m_CursorType; }

View File

@ -189,6 +189,9 @@ private:
Rainmeter(); Rainmeter();
~Rainmeter(); ~Rainmeter();
Rainmeter(const Rainmeter& other) = delete;
Rainmeter& operator=(Rainmeter other) = delete;
static LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void ActivateActiveSkins(); void ActivateActiveSkins();

View File

@ -31,6 +31,8 @@ class __declspec(novtable) Section : public Group
public: public:
virtual ~Section(); virtual ~Section();
Section(const Section& other) = delete;
virtual UINT GetTypeID() = 0; virtual UINT GetTypeID() = 0;
const WCHAR* GetName() const { return m_Name.c_str(); } const WCHAR* GetName() const { return m_Name.c_str(); }

View File

@ -29,6 +29,10 @@
class SkinRegistry class SkinRegistry
{ {
public: public:
SkinRegistry() = default;
SkinRegistry(const SkinRegistry& other) = delete;
SkinRegistry& operator=(SkinRegistry other) = delete;
struct Folder struct Folder
{ {
std::wstring name; std::wstring name;

View File

@ -46,6 +46,9 @@ struct MultiMonitorInfo
class System class System
{ {
public: public:
System(const System& other) = delete;
System& operator=(System other) = delete;
static void Initialize(HINSTANCE instance); static void Initialize(HINSTANCE instance);
static void Finalize(); static void Finalize();

View File

@ -73,6 +73,9 @@ public:
TintedImage(const WCHAR* name = L"ImageName", const WCHAR** optionArray = c_DefaultOptionArray, bool disableTransform = false, MeterWindow* meterWindow = nullptr); TintedImage(const WCHAR* name = L"ImageName", const WCHAR** optionArray = c_DefaultOptionArray, bool disableTransform = false, MeterWindow* meterWindow = nullptr);
~TintedImage(); ~TintedImage();
TintedImage(const TintedImage& other) = delete;
TintedImage& operator=(TintedImage other) = delete;
void ReadOptions(ConfigParser& parser, const WCHAR* section, const WCHAR* imagePath = L""); void ReadOptions(ConfigParser& parser, const WCHAR* section, const WCHAR* imagePath = L"");
bool IsLoaded() { return (m_Bitmap != nullptr); } bool IsLoaded() { return (m_Bitmap != nullptr); }

View File

@ -43,6 +43,9 @@ public:
TrayWindow(); TrayWindow();
~TrayWindow(); ~TrayWindow();
TrayWindow(const TrayWindow& other) = delete;
TrayWindow& operator=(TrayWindow other) = delete;
void Initialize(); void Initialize();
void ReadOptions(ConfigParser& parser); void ReadOptions(ConfigParser& parser);