From 2122a857662203936a04a39df7d0e1ad1db82853 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 6 Jan 2007 04:16:26 +0000 Subject: Work on Port destruction (still broken). git-svn-id: http://svn.drobilla.net/lad/ingen@233 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/GraphObject.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/GraphObject.h') diff --git a/src/libs/engine/GraphObject.h b/src/libs/engine/GraphObject.h index 8fe2a0a6..1f3caa7b 100644 --- a/src/libs/engine/GraphObject.h +++ b/src/libs/engine/GraphObject.h @@ -49,7 +49,7 @@ public: typedef std::map MetadataMap; GraphObject(GraphObject* parent, const string& name) - : _parent(parent), _name(name) + : _store(NULL), _parent(parent), _name(name) { assert(parent == NULL || _name.length() > 0); assert(_name.find("/") == string::npos); @@ -83,10 +83,13 @@ public: /** Patch and Node override this to recursively add their children. */ - virtual void add_to_store(ObjectStore* store) = 0; + virtual void add_to_store(ObjectStore* store); /** Patch and Node override this to recursively remove their children. */ - virtual void remove_from_store() = 0; + virtual void remove_from_store(); + + /** The Patch this object is a child of. */ + virtual Patch* parent_patch() const; /** Path is dynamically generated from parent to ease renaming */ inline const Path path() const { @@ -99,6 +102,7 @@ public: } protected: + ObjectStore* _store; GraphObject* _parent; string _name; -- cgit v1.2.1