Skip to content

Commit

Permalink
Sketcher: SketchGeometryExtension separation to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahtahiriyo committed Nov 3, 2020
1 parent 5b415f6 commit 7bfec92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 12 additions & 3 deletions src/Mod/Sketcher/App/SketchGeometryExtension.h
Expand Up @@ -29,7 +29,16 @@
namespace Sketcher
{

class SketcherExport SketchGeometryExtension : public Part::GeometryExtension
class ISketchGeometryExtension
{

public:
// Identification information
virtual long getId() const = 0;
virtual void setId(long id) = 0;
};

class SketcherExport SketchGeometryExtension : public Part::GeometryExtension, ISketchGeometryExtension
{
TYPESYSTEM_HEADER_WITH_OVERRIDE();
public:
Expand All @@ -46,8 +55,8 @@ class SketcherExport SketchGeometryExtension : public Part::GeometryExtension

virtual PyObject *getPyObject(void) override;

long getId() const {return Id;}
void setId(long id) {Id = id;}
virtual long getId() const override {return Id;}
virtual void setId(long id) override {Id = id;}

private:
SketchGeometryExtension(const SketchGeometryExtension&) = default;
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Sketcher/App/SketchGeometryExtensionPyImp.cpp
Expand Up @@ -89,8 +89,6 @@ void SketchGeometryExtensionPy::setId(Py::Long Id)
this->getSketchGeometryExtensionPtr()->setId(long(Id));
}



PyObject *SketchGeometryExtensionPy::getCustomAttributes(const char* /*attr*/) const
{
return 0;
Expand Down

0 comments on commit 7bfec92

Please sign in to comment.