diff options
Diffstat (limited to 'src/libs/shared')
-rw-r--r-- | src/libs/shared/Makefile.am | 8 | ||||
-rw-r--r-- | src/libs/shared/Store.hpp | 17 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/libs/shared/Makefile.am b/src/libs/shared/Makefile.am index e6cbee60..6a073148 100644 --- a/src/libs/shared/Makefile.am +++ b/src/libs/shared/Makefile.am @@ -1,9 +1,11 @@ noinst_LTLIBRARIES = libingen_shared.la -libingen_shared_la_CXXFLAGS = @INGEN_CFLAGS@ @REDLANDMM_CFLAGS@ @SLV2_CFLAGS@ +libingen_shared_la_CXXFLAGS = @INGEN_CFLAGS@ @REDLANDMM_CFLAGS@ @SLV2_CFLAGS@ @RAUL_CFLAGS@ libingen_shared_la_SOURCES = \ - LV2Features.hpp \ LV2Features.cpp \ + LV2Features.hpp \ LV2URIMap.cpp \ - LV2URIMap.hpp + LV2URIMap.hpp \ + Store.cpp \ + 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 <string> #include <raul/PathTable.hpp> #include "interface/GraphObject.hpp" using Raul::PathTable; -using Raul::Path; namespace Ingen { namespace Shared { -class Store { +class Store : public Raul::PathTable< SharedPtr<Shared::GraphObject> > { public: - typedef Raul::PathTable< SharedPtr<Shared::GraphObject> > 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<Shared::GraphObject> > Objects; - virtual Objects::const_iterator children_begin(SharedPtr<Shared::GraphObject> o) const = 0; - virtual Objects::const_iterator children_end(SharedPtr<Shared::GraphObject> o) const = 0; + const_iterator children_begin(SharedPtr<Shared::GraphObject> o) const; + const_iterator children_end(SharedPtr<Shared::GraphObject> o) const; + + SharedPtr<Shared::GraphObject> find_child(SharedPtr<Shared::GraphObject> parent, + const std::string& child_name) const; }; |