Part/Sketcher: Refactor Geometry Extensions copy/save/restore AND attachment notification
========================================================================================= - Long overdue refactor to avoid repetition during save/restore and copy. - New interface to notify an extension when it is attached. It also enables the extension to gain a pointer to the geometry container. This is intended to extend the functionality already existing in Part::Geometry.
This commit is contained in:
committed by
abdullahtahiriyo
parent
927fdc9edc
commit
e6af511f39
@@ -67,10 +67,6 @@ public:
|
||||
ExternalGeometryExtension() = default;
|
||||
virtual ~ExternalGeometryExtension() override = default;
|
||||
|
||||
// Persistence implementer ---------------------
|
||||
virtual void Save(Base::Writer &/*writer*/) const override;
|
||||
virtual void Restore(Base::XMLReader &/*reader*/) override;
|
||||
|
||||
virtual std::unique_ptr<Part::GeometryExtension> copy(void) const override;
|
||||
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
@@ -88,6 +84,11 @@ public:
|
||||
|
||||
static bool getFlagsFromName(std::string str, ExternalGeometryExtension::Flag &flag);
|
||||
|
||||
protected:
|
||||
virtual void copyAttributes(Part::GeometryExtension * cpy) const override;
|
||||
virtual void restoreAttributes(Base::XMLReader &reader) override;
|
||||
virtual void saveAttributes(Base::Writer &writer) const override;
|
||||
|
||||
private:
|
||||
ExternalGeometryExtension(const ExternalGeometryExtension&) = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user