cppcoreguidelines-special-member-functions
* disable move constructor and move assignment for several core classes
This commit is contained in:
@@ -48,6 +48,11 @@ public:
|
||||
}
|
||||
virtual ~ExtensionPythonT() {
|
||||
}
|
||||
|
||||
ExtensionPythonT(const ExtensionPythonT&) = delete;
|
||||
ExtensionPythonT(ExtensionPythonT&&) = delete;
|
||||
ExtensionPythonT& operator= (const ExtensionPythonT&) = delete;
|
||||
ExtensionPythonT& operator= (ExtensionPythonT&&) = delete;
|
||||
};
|
||||
|
||||
typedef ExtensionPythonT<App::Extension> ExtensionPython;
|
||||
|
||||
@@ -85,6 +85,11 @@ protected:
|
||||
virtual void onSettingDocument() {
|
||||
FeatureT::onSettingDocument();
|
||||
}
|
||||
|
||||
FeatureCustomT(const FeatureCustomT&) = delete;
|
||||
FeatureCustomT(FeatureCustomT&&) = delete;
|
||||
FeatureCustomT& operator= (const FeatureCustomT&) = delete;
|
||||
FeatureCustomT& operator= (FeatureCustomT&&) = delete;
|
||||
};
|
||||
|
||||
} //namespace App
|
||||
|
||||
@@ -342,6 +342,12 @@ protected:
|
||||
FeatureT::onDocumentRestored();
|
||||
}
|
||||
|
||||
public:
|
||||
FeaturePythonT(const FeaturePythonT&) = delete;
|
||||
FeaturePythonT(FeaturePythonT&&) = delete;
|
||||
FeaturePythonT& operator= (const FeaturePythonT&) = delete;
|
||||
FeaturePythonT& operator= (FeaturePythonT&&) = delete;
|
||||
|
||||
private:
|
||||
FeaturePythonImp* imp;
|
||||
PropertyPythonObject Proxy;
|
||||
|
||||
@@ -905,10 +905,16 @@ private:
|
||||
{\
|
||||
public:\
|
||||
X();\
|
||||
virtual ~X(){}\
|
||||
virtual const char* className() const\
|
||||
{ return #X; }\
|
||||
protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + isActive()
|
||||
@@ -926,6 +932,11 @@ public:\
|
||||
protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual bool isActive(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + createAction()
|
||||
@@ -943,6 +954,11 @@ public:\
|
||||
protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual Gui::Action * createAction(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + isActive() + createAction()
|
||||
@@ -961,6 +977,11 @@ protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual bool isActive(void);\
|
||||
virtual Gui::Action * createAction(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + isActive() + updateAction()
|
||||
@@ -979,6 +1000,11 @@ public:\
|
||||
protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual bool isActive(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + isActive() + createAction()
|
||||
@@ -999,6 +1025,11 @@ protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual bool isActive(void);\
|
||||
virtual Gui::Action * createAction(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro Standard + isActive() + createAction()
|
||||
@@ -1020,6 +1051,11 @@ protected: \
|
||||
virtual void activated(int iMsg);\
|
||||
virtual bool isActive(void);\
|
||||
virtual Gui::Action * createAction(void);\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
/** The Command Macro view
|
||||
@@ -1042,6 +1078,11 @@ protected: \
|
||||
Gui::MDIView* view = Gui::getMainWindow()->activeWindow();\
|
||||
return view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId());\
|
||||
}\
|
||||
private:\
|
||||
X(const X&) = delete;\
|
||||
X(X&&) = delete;\
|
||||
X& operator= (const X&) = delete;\
|
||||
X& operator= (X&&) = delete;\
|
||||
};
|
||||
|
||||
#endif // GUI_COMMAND_H
|
||||
|
||||
@@ -47,6 +47,11 @@ public:
|
||||
}
|
||||
virtual ~ViewProviderExtensionPythonT() {
|
||||
}
|
||||
|
||||
ViewProviderExtensionPythonT(const ViewProviderExtensionPythonT&) = delete;
|
||||
ViewProviderExtensionPythonT(ViewProviderExtensionPythonT&&) = delete;
|
||||
ViewProviderExtensionPythonT& operator= (const ViewProviderExtensionPythonT&) = delete;
|
||||
ViewProviderExtensionPythonT& operator= (ViewProviderExtensionPythonT&&) = delete;
|
||||
};
|
||||
|
||||
typedef ViewProviderExtensionPythonT<Gui::ViewProviderExtension> ViewProviderExtensionPython;
|
||||
|
||||
@@ -608,6 +608,12 @@ protected:
|
||||
viewerMode = mode;
|
||||
}
|
||||
|
||||
public:
|
||||
ViewProviderPythonFeatureT(const ViewProviderPythonFeatureT&) = delete;
|
||||
ViewProviderPythonFeatureT(ViewProviderPythonFeatureT&&) = delete;
|
||||
ViewProviderPythonFeatureT& operator= (const ViewProviderPythonFeatureT&) = delete;
|
||||
ViewProviderPythonFeatureT& operator= (ViewProviderPythonFeatureT&&) = delete;
|
||||
|
||||
private:
|
||||
ViewProviderPythonFeatureImp* imp;
|
||||
App::PropertyPythonObject Proxy;
|
||||
|
||||
@@ -310,6 +310,12 @@ protected:
|
||||
return seekoff(pos, std::ios_base::beg);
|
||||
}
|
||||
|
||||
private:
|
||||
DataStreambuf(const DataStreambuf&) = delete;
|
||||
DataStreambuf(DataStreambuf&&) = delete;
|
||||
DataStreambuf& operator=(const DataStreambuf&) = delete;
|
||||
DataStreambuf& operator=(DataStreambuf&&) = delete;
|
||||
|
||||
private:
|
||||
const std::vector<char>& _buffer;
|
||||
int _beg, _end, _cur;
|
||||
|
||||
Reference in New Issue
Block a user