From 8ba6bb943889bfdd58cf4a971a152041c1199cfe Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Apr 2011 12:47:15 +0000 Subject: Put engine code in new Ingen::Engine namespace. Put core interfaces in Ingen namespace (not Ingen::Shared). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3159 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/Builder.hpp | 4 +++- src/shared/ClashAvoider.cpp | 12 ++++++------ src/shared/ClashAvoider.hpp | 6 +++--- src/shared/LV2Atom.cpp | 1 - src/shared/LV2Features.hpp | 3 ++- src/shared/Store.cpp | 10 +++++----- src/shared/Store.hpp | 14 +++++++------- src/shared/World.cpp | 4 ++-- src/shared/World.hpp | 6 +++--- 9 files changed, 31 insertions(+), 29 deletions(-) (limited to 'src/shared') diff --git a/src/shared/Builder.hpp b/src/shared/Builder.hpp index 0369498b..91957d0a 100644 --- a/src/shared/Builder.hpp +++ b/src/shared/Builder.hpp @@ -23,10 +23,12 @@ namespace Raul { class Path; } namespace Ingen { -namespace Shared { class CommonInterface; class GraphObject; + +namespace Shared { + class LV2URIMap; /** Wrapper for CommonInterface to create existing objects/models. diff --git a/src/shared/ClashAvoider.cpp b/src/shared/ClashAvoider.cpp index 049c33ee..19a8f15d 100644 --- a/src/shared/ClashAvoider.cpp +++ b/src/shared/ClashAvoider.cpp @@ -142,17 +142,17 @@ ClashAvoider::exists(const Raul::Path& path) const } void -ClashAvoider::put(const Raul::URI& path, - const Shared::Resource::Properties& properties, - Resource::Graph ctx) +ClashAvoider::put(const Raul::URI& path, + const Resource::Properties& properties, + Resource::Graph ctx) { _target.put(map_uri(path), properties, ctx); } void -ClashAvoider::delta(const Raul::URI& path, - const Shared::Resource::Properties& remove, - const Shared::Resource::Properties& add) +ClashAvoider::delta(const Raul::URI& path, + const Resource::Properties& remove, + const Resource::Properties& add) { _target.delta(map_uri(path), remove, add); } diff --git a/src/shared/ClashAvoider.hpp b/src/shared/ClashAvoider.hpp index 7a6af32f..13eb1007 100644 --- a/src/shared/ClashAvoider.hpp +++ b/src/shared/ClashAvoider.hpp @@ -51,9 +51,9 @@ public: const Resource::Properties& properties, Resource::Graph ctx=Resource::DEFAULT); - virtual void delta(const Raul::URI& path, - const Shared::Resource::Properties& remove, - const Shared::Resource::Properties& add); + virtual void delta(const Raul::URI& path, + const Resource::Properties& remove, + const Resource::Properties& add); virtual void move(const Raul::Path& old_path, const Raul::Path& new_path); diff --git a/src/shared/LV2Atom.cpp b/src/shared/LV2Atom.cpp index af540623..4f6afec4 100644 --- a/src/shared/LV2Atom.cpp +++ b/src/shared/LV2Atom.cpp @@ -88,6 +88,5 @@ from_atom(const Shared::LV2URIMap& uris, const Raul::Atom& atom, LV2_Atom* objec } } // namespace LV2Atom - } // namespace Shared } // namespace Ingen diff --git a/src/shared/LV2Features.hpp b/src/shared/LV2Features.hpp index aaae3b67..eef056d5 100644 --- a/src/shared/LV2Features.hpp +++ b/src/shared/LV2Features.hpp @@ -27,9 +27,10 @@ namespace Ingen { +class Node; + namespace Shared { -class Node; class World; /** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features). diff --git a/src/shared/Store.cpp b/src/shared/Store.cpp index 647dcda2..9d5639b1 100644 --- a/src/shared/Store.cpp +++ b/src/shared/Store.cpp @@ -48,7 +48,7 @@ Store::add(GraphObject* o) } Store::const_iterator -Store::children_begin(SharedPtr o) const +Store::children_begin(SharedPtr o) const { const_iterator parent = find(o->path()); assert(parent != end()); @@ -57,15 +57,15 @@ Store::children_begin(SharedPtr o) const } Store::const_iterator -Store::children_end(SharedPtr o) const +Store::children_end(SharedPtr o) const { const_iterator parent = find(o->path()); assert(parent != end()); return find_descendants_end(parent); } -SharedPtr -Store::find_child(SharedPtr parent, const string& child_name) const +SharedPtr +Store::find_child(SharedPtr parent, const string& child_name) const { const_iterator pi = find(parent->path()); assert(pi != end()); @@ -74,7 +74,7 @@ Store::find_child(SharedPtr parent, const string& child_nam if (child != end()) return child->second; else - return SharedPtr(); + return SharedPtr(); } unsigned diff --git a/src/shared/Store.hpp b/src/shared/Store.hpp index 43aba4e3..53f4ecf2 100644 --- a/src/shared/Store.hpp +++ b/src/shared/Store.hpp @@ -26,19 +26,19 @@ namespace Ingen { namespace Shared { -class Store : public Raul::PathTable< SharedPtr > { +class Store : public Raul::PathTable< SharedPtr > { public: virtual ~Store() {} - virtual void add(Shared::GraphObject* o); + virtual void add(GraphObject* o); - typedef Raul::Table< Raul::Path, SharedPtr > Objects; + typedef Raul::Table< Raul::Path, SharedPtr > Objects; - const_iterator children_begin(SharedPtr o) const; - const_iterator children_end(SharedPtr o) const; + 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; + SharedPtr find_child(SharedPtr parent, + const std::string& child_name) const; unsigned child_name_offset(const Raul::Path& parent, const Raul::Symbol& symbol, diff --git a/src/shared/World.cpp b/src/shared/World.cpp index e53bcf4f..eea7bbd5 100644 --- a/src/shared/World.cpp +++ b/src/shared/World.cpp @@ -245,14 +245,14 @@ World::unload_modules() /** Get an interface for a remote engine at @a url */ -SharedPtr +SharedPtr World::interface(const std::string& url) { const string scheme = url.substr(0, url.find(":")); const Pimpl::InterfaceFactories::const_iterator i = _impl->interface_factories.find(scheme); if (i == _impl->interface_factories.end()) { warn << "Unknown URI scheme `" << scheme << "'" << endl; - return SharedPtr(); + return SharedPtr(); } return i->second(this, url); diff --git a/src/shared/World.hpp b/src/shared/World.hpp index 189e2bbe..7f100d8a 100644 --- a/src/shared/World.hpp +++ b/src/shared/World.hpp @@ -36,12 +36,12 @@ namespace Sord { class World; } namespace Ingen { class EngineBase; +class EngineInterface; namespace Serialisation { class Serialiser; class Parser; } namespace Shared { -class EngineInterface; class LV2Features; class LV2URIMap; class Store; @@ -63,14 +63,14 @@ public: virtual bool load_module(const char* name); virtual void unload_modules(); - typedef SharedPtr (*InterfaceFactory)( + typedef SharedPtr (*InterfaceFactory)( World* world, const std::string& engine_url); virtual void add_interface_factory(const std::string& scheme, InterfaceFactory factory); - virtual SharedPtr interface( + virtual SharedPtr interface( const std::string& engine_url); virtual bool run(const std::string& mime_type, -- cgit v1.2.1