Fix clang compiler warnings:
+ fix -Winconsistent-missing-override + fix -Wunused-private-field + suppress -Woverloaded-virtual but fix later
This commit is contained in:
@@ -60,7 +60,7 @@ namespace App
|
||||
/// The document class
|
||||
class AppExport Document : public App::PropertyContainer
|
||||
{
|
||||
PROPERTY_HEADER(App::Document);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(App::Document);
|
||||
|
||||
public:
|
||||
enum Status {
|
||||
@@ -222,11 +222,11 @@ public:
|
||||
const char* getName() const;
|
||||
//@}
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
/// returns the complete document memory consumption, including all managed DocObjects and Undo Redo.
|
||||
unsigned int getMemSize (void) const;
|
||||
unsigned int getMemSize (void) const override;
|
||||
|
||||
/** @name Object handling */
|
||||
//@{
|
||||
@@ -478,7 +478,7 @@ public:
|
||||
/// Function called to signal that an object identifier has been renamed
|
||||
void renameObjectIdentifiers(const std::map<App::ObjectIdentifier, App::ObjectIdentifier> & paths, const std::function<bool(const App::DocumentObject*)> &selector = [](const App::DocumentObject *) { return true; });
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual std::string getFullName() const override;
|
||||
|
||||
@@ -508,8 +508,8 @@ protected:
|
||||
void writeObjects(const std::vector<App::DocumentObject*>&, Base::Writer &writer) const;
|
||||
bool saveToFile(const char* filename) const;
|
||||
|
||||
void onBeforeChange(const Property* prop);
|
||||
void onChanged(const Property* prop);
|
||||
void onBeforeChange(const Property* prop) override;
|
||||
void onChanged(const Property* prop) override;
|
||||
/// callback from the Document objects before property will be changed
|
||||
void onBeforeChangeProperty(const TransactionalObject *Who, const Property *What);
|
||||
/// callback from the Document objects after property was changed
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
*/
|
||||
class AppExport DocumentObject: public App::TransactionalObject
|
||||
{
|
||||
PROPERTY_HEADER(App::DocumentObject);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(App::DocumentObject);
|
||||
|
||||
public:
|
||||
|
||||
@@ -126,8 +126,8 @@ public:
|
||||
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;
|
||||
virtual const char* detachFromDocument();
|
||||
virtual bool isAttachedToDocument() const override;
|
||||
virtual const char* detachFromDocument() override;
|
||||
/// gets the document in which this Object is handled
|
||||
App::Document *getDocument(void) const;
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
* additional or different behavior.
|
||||
*/
|
||||
virtual void onLostLinkToObject(DocumentObject*);
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
/** Get the sub element/object by name
|
||||
*
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
|
||||
static DocumentObjectExecReturn *StdReturn;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
|
||||
/* Expression support */
|
||||
|
||||
@@ -576,9 +576,9 @@ protected:
|
||||
void setDocument(App::Document* doc);
|
||||
|
||||
/// get called before the value is changed
|
||||
virtual void onBeforeChange(const Property* prop);
|
||||
virtual void onBeforeChange(const Property* prop) override;
|
||||
/// get called by the container when a property was changed
|
||||
virtual void onChanged(const Property* prop);
|
||||
virtual void onChanged(const Property* prop) override;
|
||||
/// get called after a document has been fully restored
|
||||
virtual void onDocumentRestored();
|
||||
/// get called after setting the document
|
||||
|
||||
@@ -44,11 +44,11 @@ public:
|
||||
virtual ~DocumentObjectGroup();
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
virtual const char* getViewProviderName(void) const override{
|
||||
return "Gui::ViewProviderDocumentObjectGroup";
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DocumentObjectGroup> DocumentObjectGroupPython;
|
||||
|
||||
@@ -423,8 +423,8 @@ static Py::Object _pyObjectFromAny(const App::any &value, const Expression *e) {
|
||||
return Py::Long(cast<int>(value));
|
||||
#endif
|
||||
else if (is_type(value,typeid(long))) {
|
||||
long l = cast<long>(value);
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
long l = cast<long>(value);
|
||||
if(std::abs(l)<=INT_MAX)
|
||||
return Py::Int(int(l));
|
||||
#endif
|
||||
@@ -505,7 +505,7 @@ bool pyToQuantity(Quantity &q, const Py::Object &pyobj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline Quantity pyToQuantity(const Py::Object &pyobj,
|
||||
/*static inline Quantity pyToQuantity(const Py::Object &pyobj,
|
||||
const Expression *e, const char *msg=0)
|
||||
{
|
||||
Quantity q;
|
||||
@@ -515,7 +515,7 @@ static inline Quantity pyToQuantity(const Py::Object &pyobj,
|
||||
__EXPR_THROW(TypeError,msg,e);
|
||||
}
|
||||
return q;
|
||||
}
|
||||
}*/
|
||||
|
||||
Py::Object pyFromQuantity(const Quantity &quantity) {
|
||||
if(!quantity.getUnit().isEmpty())
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
#include <deque>
|
||||
#include <App/Range.h>
|
||||
|
||||
//FIXME: PyObjectExpression hides overloaded virtual functions
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
namespace App {
|
||||
|
||||
class DocumentObject;
|
||||
@@ -654,4 +660,9 @@ public:
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif // EXPRESSION_H
|
||||
|
||||
@@ -193,7 +193,7 @@ private:
|
||||
};
|
||||
|
||||
#define PROPERTY_HEADER_WITH_EXTENSIONS(_class_) \
|
||||
PROPERTY_HEADER(_class)
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(_class)
|
||||
|
||||
/// We make sur that the PropertyData of the container is not connected to the one of the extension
|
||||
#define PROPERTY_SOURCE_WITH_EXTENSIONS(_class_, _parentclass_) \
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
template <class FeatureT>
|
||||
class FeaturePythonT : public FeatureT
|
||||
{
|
||||
PROPERTY_HEADER(App::FeaturePythonT<FeatureT>);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(App::FeaturePythonT<FeatureT>);
|
||||
|
||||
public:
|
||||
FeaturePythonT() {
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
|
||||
/** @name methods override DocumentObject */
|
||||
//@{
|
||||
short mustExecute() const {
|
||||
short mustExecute() const override {
|
||||
if (this->isTouched())
|
||||
return 1;
|
||||
auto ret = FeatureT::mustExecute();
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
return imp->mustExecute()?1:0;
|
||||
}
|
||||
/// recalculate the Feature
|
||||
virtual DocumentObjectExecReturn *execute(void) {
|
||||
virtual DocumentObjectExecReturn *execute(void) override {
|
||||
try {
|
||||
bool handled = imp->execute();
|
||||
if (!handled)
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
return FeatureT::getViewProviderNameOverride();
|
||||
}
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
virtual const char* getViewProviderName(void) const override {
|
||||
return FeatureT::getViewProviderName();
|
||||
//return "Gui::ViewProviderPythonFeature";
|
||||
}
|
||||
@@ -279,14 +279,14 @@ public:
|
||||
return FeatureT::canLoadPartial();
|
||||
}
|
||||
|
||||
PyObject *getPyObject(void) {
|
||||
PyObject *getPyObject(void) override {
|
||||
if (FeatureT::PythonObject.is(Py::_None())) {
|
||||
// ref counter is set to 1
|
||||
FeatureT::PythonObject = Py::Object(imp->getPyObject(),true);
|
||||
}
|
||||
return Py::new_reference_to(FeatureT::PythonObject);
|
||||
}
|
||||
void setPyObject(PyObject *obj) {
|
||||
void setPyObject(PyObject *obj) override {
|
||||
if (obj)
|
||||
FeatureT::PythonObject = obj;
|
||||
else
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void onBeforeChange(const Property* prop) {
|
||||
virtual void onBeforeChange(const Property* prop) override {
|
||||
FeatureT::onBeforeChange(prop);
|
||||
imp->onBeforeChange(prop);
|
||||
}
|
||||
@@ -302,13 +302,13 @@ protected:
|
||||
if(!imp->onBeforeChangeLabel(newLabel))
|
||||
FeatureT::onBeforeChangeLabel(newLabel);
|
||||
}
|
||||
virtual void onChanged(const Property* prop) {
|
||||
virtual void onChanged(const Property* prop) override {
|
||||
if(prop == &Proxy)
|
||||
imp->init(Proxy.getValue().ptr());
|
||||
imp->onChanged(prop);
|
||||
FeatureT::onChanged(prop);
|
||||
}
|
||||
virtual void onDocumentRestored() {
|
||||
virtual void onDocumentRestored() override {
|
||||
imp->onDocumentRestored();
|
||||
FeatureT::onDocumentRestored();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace App
|
||||
|
||||
class AppExport LinkBaseExtension : public App::DocumentObjectExtension
|
||||
{
|
||||
EXTENSION_PROPERTY_HEADER(App::LinkExtension);
|
||||
EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::LinkExtension);
|
||||
typedef App::DocumentObjectExtension inherited;
|
||||
|
||||
public:
|
||||
@@ -318,7 +318,7 @@ typedef ExtensionPythonT<LinkBaseExtension> LinkBaseExtensionPython;
|
||||
|
||||
class AppExport LinkExtension : public LinkBaseExtension
|
||||
{
|
||||
EXTENSION_PROPERTY_HEADER(App::LinkExtension);
|
||||
EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::LinkExtension);
|
||||
typedef LinkBaseExtension inherited;
|
||||
|
||||
public:
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
virtual ~Part();
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
virtual const char* getViewProviderName(void) const override {
|
||||
return "Gui::ViewProviderPart";
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
*/
|
||||
static App::Part* getPartOfObject (const DocumentObject* obj);
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
};
|
||||
|
||||
//typedef App::FeaturePythonT<Part> PartPython;
|
||||
|
||||
@@ -57,7 +57,7 @@ class ObjectIdentifier;
|
||||
*/
|
||||
class AppExport Property : public Base::Persistence
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
enum Status
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
* This method is defined in Base::Persistence
|
||||
* @see Base::Persistence
|
||||
*/
|
||||
virtual unsigned int getMemSize (void) const {
|
||||
virtual unsigned int getMemSize (void) const override {
|
||||
// you have to implement this method in all property classes!
|
||||
return sizeof(father) + sizeof(StatusBits);
|
||||
}
|
||||
@@ -424,7 +424,7 @@ protected:
|
||||
class AppExport PropertyLists : public Property, public PropertyListsBase
|
||||
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
public:
|
||||
virtual void setPyObject(PyObject *obj) override {
|
||||
_setPyObject(obj);
|
||||
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
class AppExport PropertyExpressionEngine : public App::PropertyExpressionContainer,
|
||||
private App::AtomicPropertyChangeInterface<PropertyExpressionEngine>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
public:
|
||||
|
||||
virtual void updateElementReference(
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
PropertyExpressionEngine();
|
||||
~PropertyExpressionEngine();
|
||||
|
||||
unsigned int getMemSize (void) const;
|
||||
unsigned int getMemSize (void) const override;
|
||||
|
||||
virtual std::map<App::ObjectIdentifier, const App::Expression*> getExpressions() const override;
|
||||
virtual void setExpressions(std::map<App::ObjectIdentifier, App::ExpressionPtr> &&exprs) override;
|
||||
@@ -111,17 +111,17 @@ public:
|
||||
|
||||
void setValue() { } // Dummy
|
||||
|
||||
Property *Copy(void) const;
|
||||
Property *Copy(void) const override;
|
||||
|
||||
void Paste(const Property &from);
|
||||
void Paste(const Property &from) override;
|
||||
|
||||
void Save (Base::Writer & writer) const;
|
||||
void Save (Base::Writer & writer) const override;
|
||||
|
||||
void Restore(Base::XMLReader &reader);
|
||||
void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
void setValue(const App::ObjectIdentifier &path, boost::shared_ptr<App::Expression> expr);
|
||||
|
||||
const boost::any getPathValue(const App::ObjectIdentifier & path) const;
|
||||
const boost::any getPathValue(const App::ObjectIdentifier & path) const override;
|
||||
|
||||
/// Execute options
|
||||
enum ExecuteOption {
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
|
||||
void renameObjectIdentifiers(const std::map<App::ObjectIdentifier, App::ObjectIdentifier> & paths);
|
||||
|
||||
App::ObjectIdentifier canonicalPath(const App::ObjectIdentifier &p) const;
|
||||
App::ObjectIdentifier canonicalPath(const App::ObjectIdentifier &p) const override;
|
||||
|
||||
size_t numExpressions() const;
|
||||
|
||||
@@ -164,8 +164,8 @@ public:
|
||||
virtual void onContainerRestored() override;
|
||||
|
||||
/* Python interface */
|
||||
PyObject *getPyObject(void);
|
||||
void setPyObject(PyObject *);
|
||||
PyObject *getPyObject(void) override;
|
||||
void setPyObject(PyObject *) override;
|
||||
|
||||
protected:
|
||||
virtual void hasSetValue() override;
|
||||
|
||||
@@ -56,7 +56,7 @@ class Placement;
|
||||
*/
|
||||
class AppExport PropertyVector: public Property
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -77,25 +77,25 @@ public:
|
||||
void setValue(double x, double y, double z);
|
||||
|
||||
/// Get valid paths for this property; used by auto completer
|
||||
void getPaths(std::vector<ObjectIdentifier> &paths) const;
|
||||
void getPaths(std::vector<ObjectIdentifier> &paths) const override;
|
||||
|
||||
/** This method returns a string representation of the property
|
||||
*/
|
||||
const Base::Vector3d &getValue(void) const;
|
||||
const char* getEditorName(void) const {
|
||||
const char* getEditorName(void) const override {
|
||||
return "Gui::PropertyEditor::PropertyVectorItem";
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const {
|
||||
virtual unsigned int getMemSize (void) const override {
|
||||
return sizeof(Base::Vector3d);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
class AppExport PropertyVectorList: public PropertyListsT<Base::Vector3d>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
typedef PropertyListsT<Base::Vector3d> inherited;
|
||||
|
||||
@@ -212,18 +212,18 @@ public:
|
||||
void setValue(double x, double y, double z);
|
||||
using inherited::setValue;
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual void SaveDocFile (Base::Writer &writer) const;
|
||||
virtual void RestoreDocFile(Base::Reader &reader);
|
||||
virtual void SaveDocFile (Base::Writer &writer) const override;
|
||||
virtual void RestoreDocFile(Base::Reader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
Base::Vector3d getPyValue(PyObject *) const override;
|
||||
@@ -283,7 +283,7 @@ private:
|
||||
*/
|
||||
class AppExport PropertyPlacement: public Property
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -315,28 +315,28 @@ public:
|
||||
const Base::Placement &getValue(void) const;
|
||||
|
||||
/// Get valid paths for this property; used by auto completer
|
||||
void getPaths(std::vector<ObjectIdentifier> &paths) const;
|
||||
void getPaths(std::vector<ObjectIdentifier> &paths) const override;
|
||||
|
||||
void setPathValue(const ObjectIdentifier &path, const boost::any &value);
|
||||
void setPathValue(const ObjectIdentifier &path, const boost::any &value) override;
|
||||
|
||||
virtual const boost::any getPathValue(const ObjectIdentifier &path) const override;
|
||||
|
||||
virtual bool getPyPathValue(const ObjectIdentifier &path, Py::Object &res) const override;
|
||||
|
||||
const char* getEditorName(void) const {
|
||||
const char* getEditorName(void) const override {
|
||||
return "Gui::PropertyEditor::PropertyPlacementItem";
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const {
|
||||
virtual unsigned int getMemSize (void) const override {
|
||||
return sizeof(Base::Placement);
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
|
||||
class AppExport PropertyPlacementList: public PropertyListsT<Base::Placement>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -387,18 +387,18 @@ public:
|
||||
|
||||
virtual ~PropertyPlacementList();
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual void SaveDocFile (Base::Writer &writer) const;
|
||||
virtual void RestoreDocFile(Base::Reader &reader);
|
||||
virtual void SaveDocFile (Base::Writer &writer) const override;
|
||||
virtual void RestoreDocFile(Base::Reader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
Base::Placement getPyValue(PyObject *) const override;
|
||||
|
||||
@@ -102,7 +102,7 @@ protected:
|
||||
/// Parent class of all link type properties
|
||||
class AppExport PropertyLinkBase : public Property, public ScopedLink
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
public:
|
||||
typedef std::pair<std::string,std::string> ShadowSub;
|
||||
|
||||
@@ -571,7 +571,7 @@ private:
|
||||
*/
|
||||
class AppExport PropertyLink : public PropertyLinkBase
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -607,19 +607,19 @@ public:
|
||||
return _pcLink ? dynamic_cast<_type>(_pcLink) : 0;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const{
|
||||
virtual unsigned int getMemSize (void) const override {
|
||||
return sizeof(App::DocumentObject *);
|
||||
}
|
||||
virtual const char* getEditorName(void) const
|
||||
virtual const char* getEditorName(void) const override
|
||||
{ return "Gui::PropertyEditor::PropertyLinkItem"; }
|
||||
|
||||
virtual void getLinks(std::vector<App::DocumentObject *> &objs,
|
||||
@@ -665,7 +665,7 @@ public:
|
||||
|
||||
class AppExport PropertyLinkListBase: public PropertyLinkBase, public PropertyListsBase
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
public:
|
||||
virtual void setPyObject(PyObject *obj) override {
|
||||
_setPyObject(obj);
|
||||
@@ -675,7 +675,7 @@ public:
|
||||
class AppExport PropertyLinkList :
|
||||
public PropertyListsT<DocumentObject*,std::vector<DocumentObject*>, PropertyLinkListBase>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
typedef PropertyListsT<DocumentObject*,std::vector<DocumentObject*>,PropertyLinkListBase> inherited;
|
||||
|
||||
public:
|
||||
@@ -691,8 +691,8 @@ public:
|
||||
*/
|
||||
virtual ~PropertyLinkList();
|
||||
|
||||
virtual void setSize(int newSize);
|
||||
virtual void setSize(int newSize, const_reference def);
|
||||
virtual void setSize(int newSize) override;
|
||||
virtual void setSize(int newSize, const_reference def) override;
|
||||
|
||||
/** Sets the property
|
||||
*/
|
||||
@@ -700,16 +700,16 @@ public:
|
||||
|
||||
void set1Value(int idx, DocumentObject * const &value) override;
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save(Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
virtual const char* getEditorName(void) const
|
||||
virtual unsigned int getMemSize(void) const override;
|
||||
virtual const char* getEditorName(void) const override
|
||||
{ return "Gui::PropertyEditor::PropertyLinkListItem"; }
|
||||
|
||||
virtual void getLinks(std::vector<App::DocumentObject *> &objs,
|
||||
@@ -772,7 +772,7 @@ class PropertyXLinkSub;
|
||||
*/
|
||||
class AppExport PropertyLinkSub : public PropertyLinkBase
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -825,14 +825,14 @@ public:
|
||||
return _pcLinkSub ? dynamic_cast<_type>(_pcLinkSub) : 0;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
/// Return a copy of the property if any changes caused by importing external object
|
||||
virtual Property *CopyOnImportExternal(const std::map<std::string,std::string> &nameMap) const override;
|
||||
@@ -843,7 +843,7 @@ public:
|
||||
virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
App::DocumentObject *oldObj, App::DocumentObject *newObj) const override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const{
|
||||
virtual unsigned int getMemSize (void) const override {
|
||||
return sizeof(App::DocumentObject *);
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ public:
|
||||
|
||||
class AppExport PropertyLinkSubList : public PropertyLinkBase
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
typedef std::pair<DocumentObject*, std::vector<std::string> > SubSet;
|
||||
@@ -967,14 +967,14 @@ public:
|
||||
void setSubListValues(const std::vector<SubSet>&);
|
||||
std::vector<SubSet> getSubListValues(bool newStyle=false) const;
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
/// Return a copy of the property if any changes caused by importing external object
|
||||
virtual Property *CopyOnImportExternal(const std::map<std::string,std::string> &nameMap) const override;
|
||||
@@ -985,7 +985,7 @@ public:
|
||||
virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
App::DocumentObject *oldObj, App::DocumentObject *newObj) const override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
virtual void updateElementReference(
|
||||
DocumentObject *feature,bool reverse=false, bool notify=false) override;
|
||||
@@ -1005,7 +1005,6 @@ private:
|
||||
std::vector<std::string> _lSubList;
|
||||
std::vector<ShadowSub> _ShadowSubList;
|
||||
std::vector<int> _mapped;
|
||||
bool _restoreLabel;
|
||||
};
|
||||
|
||||
/** The general Link Property with Child scope
|
||||
@@ -1041,7 +1040,7 @@ class PropertyXLinkSubList;
|
||||
*/
|
||||
class AppExport PropertyXLink : public PropertyLinkGlobal
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
PropertyXLink(bool allowPartial=false, PropertyLinkBase *parent=0);
|
||||
@@ -1067,11 +1066,11 @@ public:
|
||||
|
||||
virtual int checkRestore(std::string *msg=0) const override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
/// Return a copy of the property if any changes caused by importing external object
|
||||
virtual Property *CopyOnImportExternal(const std::map<std::string,std::string> &nameMap) const override;
|
||||
@@ -1082,8 +1081,8 @@ public:
|
||||
virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
App::DocumentObject *oldObj, App::DocumentObject *newObj) const override;
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
friend class DocInfo;
|
||||
|
||||
@@ -1159,10 +1158,16 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
//FIXME: PropertyXLinkSub hides overloaded virtual functions
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
/** Link to one or more (sub)object from the same or different document
|
||||
*/
|
||||
class AppExport PropertyXLinkSub: public PropertyXLink {
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
PropertyXLinkSub(bool allowPartial=false, PropertyLinkBase *parent=0);
|
||||
@@ -1180,18 +1185,22 @@ public:
|
||||
|
||||
virtual bool upgrade(Base::XMLReader &reader, const char *typeName) override;
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
protected:
|
||||
virtual PropertyXLink *createInstance() const;
|
||||
virtual PropertyXLink *createInstance() const override;
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
/** Link to one or more (sub)object(s) of one or more object(s) from the same or different document
|
||||
*/
|
||||
class AppExport PropertyXLinkSubList: public PropertyLinkBase {
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
PropertyXLinkSubList();
|
||||
@@ -1244,14 +1253,14 @@ public:
|
||||
return _Links;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual Property *CopyOnImportExternal(const std::map<std::string,std::string> &nameMap) const override;
|
||||
|
||||
@@ -1261,7 +1270,7 @@ public:
|
||||
virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
App::DocumentObject *oldObj, App::DocumentObject *newObj) const override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
virtual void updateElementReference(
|
||||
DocumentObject *feature,bool reverse=false, bool notify=false) override;
|
||||
@@ -1293,7 +1302,7 @@ protected:
|
||||
* @sa See PropertyExpressionEngine for example usage
|
||||
*/
|
||||
class AppExport PropertyXLinkContainer : public PropertyLinkBase {
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
public:
|
||||
PropertyXLinkContainer();
|
||||
~PropertyXLinkContainer();
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
*/
|
||||
class AppExport PropertyIntegerList: public PropertyListsT<long>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -319,17 +319,17 @@ public:
|
||||
*/
|
||||
virtual ~PropertyIntegerList();
|
||||
|
||||
virtual const char* getEditorName(void) const
|
||||
virtual const char* getEditorName(void) const override
|
||||
{ return "Gui::PropertyEditor::PropertyIntegerListItem"; }
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
long getPyValue(PyObject *item) const override;
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
|
||||
class AppExport PropertyFloatList: public PropertyListsT<double>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
|
||||
@@ -598,20 +598,20 @@ public:
|
||||
*/
|
||||
virtual ~PropertyFloatList();
|
||||
|
||||
virtual const char* getEditorName(void) const
|
||||
virtual const char* getEditorName(void) const override
|
||||
{ return "Gui::PropertyEditor::PropertyFloatListItem"; }
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual void SaveDocFile (Base::Writer &writer) const;
|
||||
virtual void RestoreDocFile(Base::Reader &reader);
|
||||
virtual void SaveDocFile (Base::Writer &writer) const override;
|
||||
virtual void RestoreDocFile(Base::Reader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
double getPyValue(PyObject *item) const override;
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
|
||||
class AppExport PropertyStringList: public PropertyListsT<std::string>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
typedef PropertyListsT<std::string> inherited;
|
||||
|
||||
public:
|
||||
@@ -743,18 +743,18 @@ public:
|
||||
void setValues(const std::list<std::string>&);
|
||||
using inherited::setValues;
|
||||
|
||||
virtual const char* getEditorName(void) const
|
||||
virtual const char* getEditorName(void) const override
|
||||
{ return "Gui::PropertyEditor::PropertyStringListItem"; }
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
std::string getPyValue(PyObject *item) const override;
|
||||
@@ -809,22 +809,22 @@ private:
|
||||
*/
|
||||
class AppExport PropertyBoolList : public PropertyListsT<bool,boost::dynamic_bitset<> >
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
typedef PropertyListsT<bool,boost::dynamic_bitset<> > inherited;
|
||||
|
||||
public:
|
||||
PropertyBoolList();
|
||||
virtual ~PropertyBoolList();
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
virtual void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
bool getPyValue(PyObject *) const override;
|
||||
@@ -881,7 +881,7 @@ private:
|
||||
|
||||
class AppExport PropertyColorList: public PropertyListsT<Color>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
|
||||
@@ -897,17 +897,17 @@ public:
|
||||
*/
|
||||
virtual ~PropertyColorList();
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save (Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual void SaveDocFile (Base::Writer &writer) const;
|
||||
virtual void RestoreDocFile(Base::Reader &reader);
|
||||
virtual void SaveDocFile (Base::Writer &writer) const override;
|
||||
virtual void RestoreDocFile(Base::Reader &reader) override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual unsigned int getMemSize (void) const;
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
virtual unsigned int getMemSize (void) const override;
|
||||
|
||||
protected:
|
||||
Color getPyValue(PyObject *) const override;
|
||||
@@ -969,7 +969,7 @@ private:
|
||||
*/
|
||||
class AppExport PropertyMaterialList : public PropertyListsT<Material>
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
|
||||
@@ -985,19 +985,19 @@ public:
|
||||
*/
|
||||
virtual ~PropertyMaterialList();
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
virtual void Save(Base::Writer &writer) const override;
|
||||
virtual void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual void SaveDocFile(Base::Writer &writer) const;
|
||||
virtual void RestoreDocFile(Base::Reader &reader);
|
||||
virtual void SaveDocFile(Base::Writer &writer) const override;
|
||||
virtual void RestoreDocFile(Base::Reader &reader) override;
|
||||
|
||||
virtual const char* getEditorName(void) const;
|
||||
virtual const char* getEditorName(void) const override;
|
||||
|
||||
virtual Property *Copy(void) const;
|
||||
virtual void Paste(const Property &from);
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
virtual Property *Copy(void) const override;
|
||||
virtual void Paste(const Property &from) override;
|
||||
virtual unsigned int getMemSize(void) const override;
|
||||
|
||||
protected:
|
||||
Material getPyValue(PyObject *) const override;
|
||||
@@ -1010,7 +1010,7 @@ protected:
|
||||
* object, and then read back as the Python binding of the newly created object.
|
||||
*/
|
||||
class AppExport PropertyPersistentObject: public PropertyString {
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
typedef PropertyString inherited;
|
||||
public:
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
|
||||
Reference in New Issue
Block a user