From a8b36b5637acb3fa8eb29ef0f45bd11653f412fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Aug 2008 03:23:15 +0000 Subject: Factor out common store functionality. Make store is-a Table and ditch store->objects() thing everywhere. Use a separate store in the client (fix ingen -eg). git-svn-id: http://svn.drobilla.net/lad/ingen@1397 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/shared/Store.hpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/libs/shared/Store.hpp') diff --git a/src/libs/shared/Store.hpp b/src/libs/shared/Store.hpp index 428945b9..ec29e7c0 100644 --- a/src/libs/shared/Store.hpp +++ b/src/libs/shared/Store.hpp @@ -18,26 +18,27 @@ #ifndef COMMON_STORE_H #define COMMON_STORE_H +#include #include #include "interface/GraphObject.hpp" using Raul::PathTable; -using Raul::Path; namespace Ingen { namespace Shared { -class Store { +class Store : public Raul::PathTable< SharedPtr > { public: - typedef Raul::PathTable< SharedPtr > Objects; - virtual const Objects& objects() const = 0; - - virtual Objects::iterator find(const Path& path) = 0; virtual void add(GraphObject* o) = 0; + + typedef Raul::Table< Raul::Path, SharedPtr > Objects; - virtual Objects::const_iterator children_begin(SharedPtr o) const = 0; - virtual Objects::const_iterator children_end(SharedPtr o) const = 0; + const_iterator children_begin(SharedPtr o) const; + const_iterator children_end(SharedPtr o) const; + + SharedPtr find_child(SharedPtr parent, + const std::string& child_name) const; }; -- cgit v1.2.1