App: Use override etc 2

This commit is contained in:
berniev
2022-08-09 17:26:02 +10:00
committed by wwmayer
parent 91ea39a5c0
commit 3891e85c32
4 changed files with 26 additions and 26 deletions

View File

@@ -130,7 +130,7 @@ public:
/// Constructor
DocumentObject();
virtual ~DocumentObject();
~DocumentObject() override;
/// returns the name which is set in the document for this object (not the name property!)
const char *getNameInDocument() const;
@@ -139,9 +139,9 @@ public:
/// returns the name that is safe to be exported to other document
std::string getExportName(bool forced=false) const;
/// Return the object full name of the form DocName#ObjName
virtual std::string getFullName() const override;
virtual bool isAttachedToDocument() const override;
virtual const char* detachFromDocument() override;
std::string getFullName() const override;
bool isAttachedToDocument() const override;
const char* detachFromDocument() override;
/// gets the document in which this Object is handled
App::Document *getDocument() const;
@@ -317,7 +317,7 @@ public:
* additional or different behavior.
*/
virtual void onLostLinkToObject(DocumentObject*);
virtual PyObject *getPyObject() override;
PyObject *getPyObject() override;
/** Get the sub element/object by name
*
@@ -419,7 +419,7 @@ public:
static DocumentObjectExecReturn *StdReturn;
virtual void Save (Base::Writer &writer) const override;
void Save (Base::Writer &writer) const override;
/* Expression support */
@@ -437,9 +437,9 @@ public:
return _pcViewProviderName.c_str();
}
virtual bool removeDynamicProperty(const char* prop) override;
bool removeDynamicProperty(const char* prop) override;
virtual App::Property* addDynamicProperty(
App::Property* addDynamicProperty(
const char* type, const char* name=nullptr,
const char* group=nullptr, const char* doc=nullptr,
short attr=0, bool ro=false, bool hidden=false) override;
@@ -597,9 +597,9 @@ protected:
void setDocument(App::Document* doc);
/// get called before the value is changed
virtual void onBeforeChange(const Property* prop) override;
void onBeforeChange(const Property* prop) override;
/// get called by the container when a property was changed
virtual void onChanged(const Property* prop) override;
void onChanged(const Property* prop) override;
/// get called after a document has been fully restored
virtual void onDocumentRestored();
/// get called after an undo/redo transaction is finished
@@ -612,7 +612,7 @@ protected:
virtual void unsetupObject();
/// get called when a property status has changed
virtual void onPropertyStatusChanged(const Property &prop, unsigned long oldStatus) override;
void onPropertyStatusChanged(const Property &prop, unsigned long oldStatus) override;
/// python object of this class and all descendent
protected: // attributes

View File

@@ -81,7 +81,7 @@ public:
{
}
void visit(Expression &node) {
void visit(Expression &node) override {
this->relabeledDocument(node,doc.getOldLabel(),doc.Label.getStrValue());
}

View File

@@ -81,11 +81,11 @@ public:
}
// Auto generated code. See class document of LinkParams.
~LinkParamsP() {
~LinkParamsP() override {
}
// Auto generated code. See class document of LinkParams.
void OnChange(Base::Subject<const char*> &, const char* sReason) {
void OnChange(Base::Subject<const char*> &, const char* sReason) override {
if(!sReason)
return;
auto it = funcs.find(sReason);

View File

@@ -55,7 +55,7 @@ class AppExport LinkBaseExtension : public App::DocumentObjectExtension
public:
LinkBaseExtension();
virtual ~LinkBaseExtension();
~LinkBaseExtension() override;
PropertyBool _LinkTouched;
PropertyInteger _LinkOwner;
@@ -286,19 +286,19 @@ public:
bool extensionGetLinkedObject(DocumentObject *&ret,
bool recurse, Base::Matrix4D *mat, bool transform, int depth) const override;
virtual App::DocumentObjectExecReturn *extensionExecute() override;
virtual short extensionMustExecute() override;
virtual void extensionOnChanged(const Property* p) override;
virtual void onExtendedUnsetupObject () override;
virtual void onExtendedDocumentRestored() override;
App::DocumentObjectExecReturn *extensionExecute() override;
short extensionMustExecute() override;
void extensionOnChanged(const Property* p) override;
void onExtendedUnsetupObject () override;
void onExtendedDocumentRestored() override;
virtual int extensionSetElementVisible(const char *, bool) override;
virtual int extensionIsElementVisible(const char *) override;
virtual bool extensionHasChildElement() const override;
int extensionSetElementVisible(const char *, bool) override;
int extensionIsElementVisible(const char *) override;
bool extensionHasChildElement() const override;
virtual PyObject* getExtensionPyObject() override;
PyObject* getExtensionPyObject() override;
virtual Property *extensionGetPropertyByName(const char* name) const override;
Property *extensionGetPropertyByName(const char* name) const override;
static int getArrayIndex(const char *subname, const char **psubname=nullptr);
int getElementIndex(const char *subname, const char **psubname=nullptr) const;
@@ -409,7 +409,7 @@ class AppExport LinkExtension : public LinkBaseExtension
public:
LinkExtension();
virtual ~LinkExtension();
~LinkExtension() override;
/** \name Helpers for defining extended parameter
*