diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-04-02 18:45:20 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-04-02 18:45:20 +0000 |
| commit | 0a7e23844c3a43203de3f5207aecb278e84ee739 (patch) | |
| tree | 73368a7dd8367c23599f0027d63c1c0a06638865 /src/sp-object.h | |
| parent | Registered classes with new factory. Hkern, Vkern and FeFuncX have to be rewr... (diff) | |
| download | inkscape-0a7e23844c3a43203de3f5207aecb278e84ee739.tar.gz inkscape-0a7e23844c3a43203de3f5207aecb278e84ee739.zip | |
Added virtual destructor to SPObject. Switched to new factory. Replaced some casts. Inkscape seems stable, car.svgz renders correctly to png.
(bzr r11608.1.70)
Diffstat (limited to 'src/sp-object.h')
| -rw-r--r-- | src/sp-object.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sp-object.h b/src/sp-object.h index d513e878a..2d3b412c9 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -20,7 +20,8 @@ class SPObjectClass; #define SP_TYPE_OBJECT (sp_object_get_type()) #define SP_OBJECT(obj) ((SPObject*)obj) -#define SP_IS_OBJECT(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPObject))) +//#define SP_IS_OBJECT(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPObject))) +#define SP_IS_OBJECT(obj) (dynamic_cast<const SPObject*>((SPObject*)obj)) /* Async modification flags */ #define SP_OBJECT_MODIFIED_FLAG (1 << 0) @@ -190,7 +191,7 @@ class CObject; * provides document level functionality such as the undo stack, * dictionary and so on. Source: doc/architecture.txt */ -class SPObject : public GObject { +class SPObject { // : public GObject { public: enum CollectionPolicy { COLLECT_WITH_PARENT, @@ -198,6 +199,8 @@ public: }; SPObject(); + virtual ~SPObject(); + CObject* cobject; std::set<TypeInfo> typeHierarchy; |
