summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-30 23:22:44 +0000
committerDavid Robillard <d@drobilla.net>2012-07-30 23:22:44 +0000
commit9088edb2534a616b757197662d77abcb0291470b (patch)
treefc3c86d6a7af39642768d4b864dd38438f9a2e48
parent0e1bf6ddfc77866ff6477a3f394c030c2a5e1b39 (diff)
downloadingen-9088edb2534a616b757197662d77abcb0291470b.tar.gz
ingen-9088edb2534a616b757197662d77abcb0291470b.tar.bz2
ingen-9088edb2534a616b757197662d77abcb0291470b.zip
Merge Resource and ResourceImpl, eliminating more virtual inheritance.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4577 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--ingen/GraphObject.hpp8
-rw-r--r--ingen/Plugin.hpp6
-rw-r--r--ingen/Resource.hpp62
-rw-r--r--ingen/client/ObjectModel.hpp5
-rw-r--r--ingen/client/PluginModel.hpp5
-rw-r--r--ingen/shared/ResourceImpl.hpp97
-rw-r--r--src/Resource.cpp (renamed from src/shared/ResourceImpl.cpp)50
-rw-r--r--src/client/ClientStore.cpp4
-rw-r--r--src/client/ObjectModel.cpp6
-rw-r--r--src/client/PluginModel.cpp6
-rw-r--r--src/gui/PortMenu.cpp2
-rw-r--r--src/server/GraphObjectImpl.cpp2
-rw-r--r--src/server/GraphObjectImpl.hpp14
-rw-r--r--src/server/PluginImpl.hpp5
-rw-r--r--src/server/events/Delta.cpp4
-rw-r--r--src/server/events/Delta.hpp28
-rw-r--r--src/shared/wscript3
-rw-r--r--wscript1
18 files changed, 129 insertions, 179 deletions
diff --git a/ingen/GraphObject.hpp b/ingen/GraphObject.hpp
index a0d5ec22..a8bee0b0 100644
--- a/ingen/GraphObject.hpp
+++ b/ingen/GraphObject.hpp
@@ -19,6 +19,7 @@
#include "ingen/Resource.hpp"
#include "raul/Deletable.hpp"
+#include "raul/Path.hpp"
#include "raul/SharedPtr.hpp"
namespace Raul {
@@ -36,8 +37,7 @@ class Plugin;
*
* @ingroup Ingen
*/
-class GraphObject : public Raul::Deletable
- , public virtual Resource
+class GraphObject : public Resource
{
public:
virtual void set_path(const Raul::Path& path) = 0;
@@ -67,6 +67,10 @@ public:
virtual GraphObject* graph_parent() const = 0;
protected:
+ GraphObject(Shared::URIs& uris, const Raul::Path& path)
+ : Resource(uris, path)
+ {}
+
Edges _edges; ///< Patches only
};
diff --git a/ingen/Plugin.hpp b/ingen/Plugin.hpp
index 41de5a2a..30c70963 100644
--- a/ingen/Plugin.hpp
+++ b/ingen/Plugin.hpp
@@ -28,9 +28,13 @@ namespace Ingen {
/** A plugin which instantiates to a Node.
* @ingroup Ingen
*/
-class Plugin : virtual public Resource
+class Plugin : public Resource
{
public:
+ Plugin(Shared::URIs& uris, const Raul::URI& uri)
+ : Resource(uris, uri)
+ {}
+
enum Type { NIL, LV2, Internal, Patch };
virtual Type type() const = 0;
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index 1815bc26..4aed2f6d 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -21,9 +21,12 @@
#include <string>
#include "raul/Atom.hpp"
+#include "raul/Deletable.hpp"
#include "raul/URI.hpp"
#include "raul/log.hpp"
+#include "ingen/shared/URIs.hpp"
+
#define NS_INGEN "http://drobilla.net/ns/ingen#"
namespace Ingen {
@@ -31,9 +34,14 @@ namespace Ingen {
/** An object with a URI described by properties.
* @ingroup Ingen
*/
-class Resource
+class Resource : public Raul::Deletable
{
public:
+ Resource(Shared::URIs& uris, const Raul::URI& uri)
+ : _uris(uris)
+ , _uri(uri)
+ {}
+
enum Graph {
DEFAULT,
EXTERNAL,
@@ -86,7 +94,10 @@ public:
virtual ~Resource() {}
- virtual const Raul::URI& uri() const = 0;
+ Shared::URIs& uris() const { return _uris; }
+
+ virtual void set_uri(const Raul::URI& uri) { _uri = uri; }
+ virtual const Raul::URI& uri() const { return _uri; }
typedef std::multimap<Raul::URI, Property> Properties;
@@ -96,22 +107,53 @@ public:
}
}
- virtual Properties properties(Resource::Graph ctx) const = 0;
+ Properties properties(Resource::Graph ctx) const;
- virtual const Properties& properties() const = 0;
- virtual Properties& properties() = 0;
- virtual const Raul::Atom& get_property(const Raul::URI& uri) const = 0;
+ virtual const Properties& properties() const { return _properties; }
+ virtual Properties& properties() { return _properties; }
+ virtual const Raul::Atom& get_property(const Raul::URI& uri) const;
virtual const Raul::Atom& set_property(const Raul::URI& uri,
const Raul::Atom& value,
- Graph ctx=DEFAULT) = 0;
+ Graph ctx=DEFAULT);
virtual void add_property(const Raul::URI& uri,
const Raul::Atom& value,
- Graph ctx=DEFAULT) = 0;
+ Graph ctx=DEFAULT);
+ virtual void remove_property(const Raul::URI& uri,
+ const Raul::Atom& value);
virtual bool has_property(const Raul::URI& uri,
- const Raul::Atom& value) const = 0;
+ const Raul::Atom& value) const;
+
+ void set_properties(const Properties& p);
+ void add_properties(const Properties& p);
+ void remove_properties(const Properties& p);
+
+ /** Hook called whenever a property is added.
+ * This can be used by derived classes to implement special behaviour for
+ * particular properties (e.g. ingen:value for ports).
+ */
+ virtual void on_property(const Raul::URI& uri, const Raul::Atom& value) {}
+
+ /** Get the ingen type from a set of Properties.
+ * If some coherent ingen type is found, true is returned and the appropriate
+ * output parameter set to true. Otherwise false is returned.
+ */
+ static bool type(const Shared::URIs& uris,
+ const Properties& properties,
+ bool& patch,
+ bool& node,
+ bool& port,
+ bool& is_output);
+
+protected:
+ const Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value) const;
+
+ Shared::URIs& _uris;
+
+private:
+ Raul::URI _uri;
+ mutable Properties _properties;
};
} // namespace Ingen
#endif // INGEN_RESOURCE_HPP
-
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 2d060a0e..2ff8f898 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -30,8 +30,8 @@
#include "raul/URI.hpp"
#include "ingen/GraphObject.hpp"
+#include "ingen/Resource.hpp"
#include "ingen/client/signal.hpp"
-#include "ingen/shared/ResourceImpl.hpp"
namespace Ingen {
@@ -52,8 +52,7 @@ class ClientStore;
*
* @ingroup IngenClient
*/
-class ObjectModel : virtual public GraphObject
- , public Ingen::Shared::ResourceImpl
+class ObjectModel : public GraphObject
{
public:
virtual ~ObjectModel();
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 395157ae..0449cb51 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -26,10 +26,10 @@
#include "raul/Symbol.hpp"
#include "sord/sordmm.hpp"
-#include "ingen/Plugin.hpp"
#include "ingen/Interface.hpp"
+#include "ingen/Plugin.hpp"
+#include "ingen/Resource.hpp"
#include "ingen/client/signal.hpp"
-#include "ingen/shared/ResourceImpl.hpp"
#include "ingen/shared/World.hpp"
namespace Ingen {
@@ -47,7 +47,6 @@ class PluginUI;
* @ingroup IngenClient
*/
class PluginModel : public Ingen::Plugin
- , public Ingen::Shared::ResourceImpl
{
public:
PluginModel(Shared::URIs& uris,
diff --git a/ingen/shared/ResourceImpl.hpp b/ingen/shared/ResourceImpl.hpp
deleted file mode 100644
index 157c0365..00000000
--- a/ingen/shared/ResourceImpl.hpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef INGEN_SHARED_RESOURCEIMPL_HPP
-#define INGEN_SHARED_RESOURCEIMPL_HPP
-
-#include "ingen/Resource.hpp"
-#include "ingen/shared/URIs.hpp"
-#include "raul/SharedPtr.hpp"
-#include "raul/URI.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class URIs;
-
-/** Implementation of a Resource.
- * @ingroup IngenShared
- */
-class ResourceImpl : virtual public Resource
-{
-public:
- ResourceImpl(URIs& uris, const Raul::URI& uri)
- : _uris(uris)
- , _uri(uri)
- {}
-
- URIs& uris() const { return _uris; }
-
- virtual void set_uri(const Raul::URI& uri) { _uri = uri; }
- virtual const Raul::URI& uri() const { return _uri; }
-
- const Properties& properties() const { return _properties; }
- Properties& properties() { return _properties; }
-
- Properties properties(Resource::Graph ctx) const;
-
- const Raul::Atom& get_property(const Raul::URI& uri) const;
-
- const Raul::Atom& set_property(const Raul::URI& uri,
- const Raul::Atom& value,
- Resource::Graph ctx=Resource::DEFAULT);
-
- /** Hook called whenever a property is added.
- * This can be used by derived classes to implement special behaviour for
- * particular properties (e.g. ingen:value for ports).
- */
- virtual void on_property(const Raul::URI& uri, const Raul::Atom& value) {}
-
- void remove_property(const Raul::URI& uri, const Raul::Atom& value);
- bool has_property(const Raul::URI& uri, const Raul::Atom& value) const;
- void add_property(const Raul::URI& uri,
- const Raul::Atom& value,
- Graph ctx = DEFAULT);
- void set_properties(const Properties& p);
- void add_properties(const Properties& p);
- void remove_properties(const Properties& p);
-
- /** Get the ingen type from a set of Properties.
- * If some coherent ingen type is found, true is returned and the appropriate
- * output parameter set to true. Otherwise false is returned.
- */
- static bool type(const URIs& uris,
- const Properties& properties,
- bool& patch,
- bool& node,
- bool& port,
- bool& is_output);
-
-protected:
- const Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value) const;
-
- URIs& _uris;
-
-private:
- Raul::URI _uri;
- mutable Properties _properties;
-};
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_SHARED_RESOURCEIMPL_HPP
-
diff --git a/src/shared/ResourceImpl.cpp b/src/Resource.cpp
index be3d445f..13959a13 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/Resource.cpp
@@ -16,7 +16,7 @@
#include <utility>
-#include "ingen/shared/ResourceImpl.hpp"
+#include "ingen/Resource.hpp"
#include "ingen/shared/URIs.hpp"
#include "raul/Atom.hpp"
#include "raul/log.hpp"
@@ -24,12 +24,11 @@
using namespace std;
namespace Ingen {
-namespace Shared {
void
-ResourceImpl::add_property(const Raul::URI& uri,
- const Raul::Atom& value,
- Graph ctx)
+Resource::add_property(const Raul::URI& uri,
+ const Raul::Atom& value,
+ Graph ctx)
{
// Ignore duplicate statements
typedef Resource::Properties::const_iterator iterator;
@@ -45,9 +44,9 @@ ResourceImpl::add_property(const Raul::URI& uri,
}
const Raul::Atom&
-ResourceImpl::set_property(const Raul::URI& uri,
- const Raul::Atom& value,
- Resource::Graph ctx)
+Resource::set_property(const Raul::URI& uri,
+ const Raul::Atom& value,
+ Resource::Graph ctx)
{
// Erase existing property in this context
for (Properties::iterator i = _properties.find(uri);
@@ -67,7 +66,7 @@ ResourceImpl::set_property(const Raul::URI& uri,
}
void
-ResourceImpl::remove_property(const Raul::URI& uri, const Raul::Atom& value)
+Resource::remove_property(const Raul::URI& uri, const Raul::Atom& value)
{
if (value == _uris.wildcard) {
_properties.erase(uri);
@@ -83,7 +82,7 @@ ResourceImpl::remove_property(const Raul::URI& uri, const Raul::Atom& value)
}
bool
-ResourceImpl::has_property(const Raul::URI& uri, const Raul::Atom& value) const
+Resource::has_property(const Raul::URI& uri, const Raul::Atom& value) const
{
Properties::const_iterator i = _properties.find(uri);
for (; (i != _properties.end()) && (i->first == uri); ++i) {
@@ -95,13 +94,13 @@ ResourceImpl::has_property(const Raul::URI& uri, const Raul::Atom& value) const
}
const Raul::Atom&
-ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) const
+Resource::set_property(const Raul::URI& uri, const Raul::Atom& value) const
{
- return const_cast<ResourceImpl*>(this)->set_property(uri, value);
+ return const_cast<Resource*>(this)->set_property(uri, value);
}
const Raul::Atom&
-ResourceImpl::get_property(const Raul::URI& uri) const
+Resource::get_property(const Raul::URI& uri) const
{
static const Raul::Atom nil;
Properties::const_iterator i = _properties.find(uri);
@@ -109,12 +108,12 @@ ResourceImpl::get_property(const Raul::URI& uri) const
}
bool
-ResourceImpl::type(const URIs& uris,
- const Properties& properties,
- bool& patch,
- bool& node,
- bool& port,
- bool& is_output)
+Resource::type(const Shared::URIs& uris,
+ const Properties& properties,
+ bool& patch,
+ bool& node,
+ bool& port,
+ bool& is_output)
{
typedef Resource::Properties::const_iterator iterator;
const std::pair<iterator, iterator> types_range = properties.equal_range(uris.rdf_type);
@@ -123,7 +122,7 @@ ResourceImpl::type(const URIs& uris,
for (iterator i = types_range.first; i != types_range.second; ++i) {
const Raul::Atom& atom = i->second;
if (atom.type() != uris.forge.URI && atom.type() != uris.forge.URID) {
- Raul::warn << "[ResourceImpl] Non-URI type " << uris.forge.str(atom) << endl;
+ Raul::warn << "[Resource] Non-URI type " << uris.forge.str(atom) << endl;
continue;
}
@@ -154,7 +153,7 @@ ResourceImpl::type(const URIs& uris,
}
void
-ResourceImpl::set_properties(const Properties& p)
+Resource::set_properties(const Properties& p)
{
/* Note a simple loop that calls set_property is inappropriate here since
it will not correctly set multiple properties in p (notably rdf:type)
@@ -170,7 +169,7 @@ ResourceImpl::set_properties(const Properties& p)
}
void
-ResourceImpl::add_properties(const Properties& p)
+Resource::add_properties(const Properties& p)
{
typedef Resource::Properties::const_iterator iterator;
for (iterator i = p.begin(); i != p.end(); ++i)
@@ -178,7 +177,7 @@ ResourceImpl::add_properties(const Properties& p)
}
void
-ResourceImpl::remove_properties(const Properties& p)
+Resource::remove_properties(const Properties& p)
{
typedef Resource::Properties::const_iterator iterator;
for (iterator i = p.begin(); i != p.end(); ++i) {
@@ -186,7 +185,7 @@ ResourceImpl::remove_properties(const Properties& p)
_properties.erase(i->first);
} else {
for (Properties::iterator j = _properties.find(i->first);
- (j != _properties.end()) && (j->first == i->first); ++j) {
+ (j != _properties.end()) && (j->first == i->first); ++j) {
if (j->second == i->second) {
_properties.erase(j);
break;
@@ -197,7 +196,7 @@ ResourceImpl::remove_properties(const Properties& p)
}
Resource::Properties
-ResourceImpl::properties(Resource::Graph ctx) const
+Resource::properties(Resource::Graph ctx) const
{
if (ctx == Resource::DEFAULT) {
return properties();
@@ -216,5 +215,4 @@ ResourceImpl::properties(Resource::Graph ctx) const
return props;
}
-} // namespace Shared
} // namespace Ingen
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 75acef63..56d94b2e 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -279,8 +279,8 @@ ClientStore::put(const Raul::URI& uri,
#endif
bool is_patch, is_node, is_port, is_output;
- ResourceImpl::type(uris(), properties,
- is_patch, is_node, is_port, is_output);
+ Resource::type(uris(), properties,
+ is_patch, is_node, is_port, is_output);
// Check if uri is a plugin
Iterator t = properties.find(_uris.rdf_type);
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index e7e7a5d8..9a5009ba 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -23,14 +23,14 @@ namespace Ingen {
namespace Client {
ObjectModel::ObjectModel(Shared::URIs& uris, const Raul::Path& path)
- : ResourceImpl(uris, path)
+ : GraphObject(uris, path)
, _path(path)
, _symbol((path == Raul::Path::root()) ? "root" : path.symbol())
{
}
ObjectModel::ObjectModel(const ObjectModel& copy)
- : ResourceImpl(copy)
+ : GraphObject(copy)
, _parent(copy._parent)
, _path(copy._path)
, _symbol(copy._symbol)
@@ -82,7 +82,7 @@ ObjectModel::set(SharedPtr<ObjectModel> o)
for (Properties::const_iterator v = o->properties().begin();
v != o->properties().end(); ++v) {
- ResourceImpl::set_property(v->first, v->second);
+ Resource::set_property(v->first, v->second);
_signal_property.emit(v->first, v->second);
}
}
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index e3ac9273..f4df6d1c 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -44,7 +44,7 @@ PluginModel::PluginModel(Shared::URIs& uris,
const Raul::URI& uri,
const Raul::URI& type_uri,
const Resource::Properties& properties)
- : ResourceImpl(uris, uri)
+ : Plugin(uris, uri)
, _type(type_from_uri(type_uri.str()))
{
add_properties(properties);
@@ -66,7 +66,7 @@ const Raul::Atom&
PluginModel::get_property(const Raul::URI& key) const
{
static const Raul::Atom nil;
- const Raul::Atom& val = ResourceImpl::get_property(key);
+ const Raul::Atom& val = Resource::get_property(key);
if (val.is_valid())
return val;
@@ -145,7 +145,7 @@ PluginModel::set(SharedPtr<PluginModel> p)
for (Properties::const_iterator v = p->properties().begin();
v != p->properties().end();
++v) {
- ResourceImpl::set_property(v->first, v->second);
+ Resource::set_property(v->first, v->second);
_signal_property.emit(v->first, v->second);
}
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 241811e5..cd611199 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -150,7 +150,7 @@ PortMenu::on_menu_expose()
const std::string label = node->label() + " " + node->port_label(port);
const Raul::Path path = node->path().str() + "_" + port->symbol().c_str();
- Shared::ResourceImpl r(*_object.get());
+ Ingen::Resource r(*_object.get());
r.remove_property(uris.lv2_index, uris.wildcard);
r.set_property(uris.lv2_symbol, _app->forge().alloc(path.symbol()));
r.set_property(uris.lv2_name, _app->forge().alloc(label.c_str()));
diff --git a/src/server/GraphObjectImpl.cpp b/src/server/GraphObjectImpl.cpp
index 901be3eb..050992c8 100644
--- a/src/server/GraphObjectImpl.cpp
+++ b/src/server/GraphObjectImpl.cpp
@@ -28,7 +28,7 @@ namespace Server {
GraphObjectImpl::GraphObjectImpl(Ingen::Shared::URIs& uris,
GraphObjectImpl* parent,
const Raul::Symbol& symbol)
- : ResourceImpl(uris, parent ? parent->path().child(symbol) : Raul::Path::root())
+ : GraphObject(uris, parent ? parent->path().child(symbol) : "/")
, _parent(parent)
, _path(parent ? parent->path().child(symbol) : "/")
, _symbol(symbol)
diff --git a/src/server/GraphObjectImpl.hpp b/src/server/GraphObjectImpl.hpp
index b2fa864e..5df7b565 100644
--- a/src/server/GraphObjectImpl.hpp
+++ b/src/server/GraphObjectImpl.hpp
@@ -17,15 +17,16 @@
#ifndef INGEN_ENGINE_GRAPHOBJECTIMPL_HPP
#define INGEN_ENGINE_GRAPHOBJECTIMPL_HPP
-#include <string>
-#include <map>
-#include <cstddef>
#include <cassert>
+#include <cstddef>
+#include <map>
+#include <string>
+
+#include "ingen/GraphObject.hpp"
+#include "ingen/Resource.hpp"
#include "raul/Deletable.hpp"
#include "raul/Path.hpp"
#include "raul/SharedPtr.hpp"
-#include "ingen/GraphObject.hpp"
-#include "ingen/shared/ResourceImpl.hpp"
namespace Raul { class Maid; }
@@ -48,8 +49,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class GraphObjectImpl : virtual public GraphObject
- , public Ingen::Shared::ResourceImpl
+class GraphObjectImpl : public GraphObject
{
public:
virtual ~GraphObjectImpl() {}
diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp
index 7ad7193c..968c43f6 100644
--- a/src/server/PluginImpl.hpp
+++ b/src/server/PluginImpl.hpp
@@ -23,7 +23,7 @@
#include <boost/utility.hpp>
#include "ingen/Plugin.hpp"
-#include "ingen/shared/ResourceImpl.hpp"
+#include "ingen/Resource.hpp"
namespace Ingen {
@@ -41,14 +41,13 @@ class BufferFactory;
* Conceptually, a Node is an instance of this.
*/
class PluginImpl : public Plugin
- , public Ingen::Shared::ResourceImpl
, public boost::noncopyable
{
public:
PluginImpl(Ingen::Shared::URIs& uris,
Type type,
const std::string& uri)
- : ResourceImpl(uris, uri)
+ : Plugin(uris, uri)
, _type(type)
{}
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 1adb9ba1..4e9ca791 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -109,7 +109,7 @@ Delta::pre_process()
_object = is_graph_object
? _engine.engine_store()->find_object(Raul::Path(_subject.str()))
- : static_cast<Shared::ResourceImpl*>(_engine.node_factory()->plugin(_subject));
+ : static_cast<Ingen::Resource*>(_engine.node_factory()->plugin(_subject));
if (!_object && (!is_graph_object || !_create)) {
return Event::pre_process_done(NOT_FOUND, _subject);
@@ -120,7 +120,7 @@ Delta::pre_process()
if (is_graph_object && !_object) {
Raul::Path path(_subject.str());
bool is_patch = false, is_node = false, is_port = false, is_output = false;
- Shared::ResourceImpl::type(uris, _properties, is_patch, is_node, is_port, is_output);
+ Ingen::Resource::type(uris, _properties, is_patch, is_node, is_port, is_output);
if (is_patch) {
_create_event = new CreatePatch(
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index e7d708ae..6bb6508a 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -26,7 +26,7 @@
namespace Ingen {
-namespace Shared { class ResourceImpl; }
+class Resource;
namespace Server {
@@ -97,19 +97,19 @@ private:
typedef std::vector<SetPortValue*> SetEvents;
- Event* _create_event;
- SetEvents _set_events;
- std::vector<SpecialType> _types;
- std::vector<SpecialType> _remove_types;
- Raul::URI _subject;
- Resource::Properties _properties;
- Resource::Properties _remove;
- Ingen::Shared::ResourceImpl* _object;
- PatchImpl* _patch;
- CompiledPatch* _compiled_patch;
- Resource::Graph _context;
- ControlBindings::Key _binding;
- bool _create;
+ Event* _create_event;
+ SetEvents _set_events;
+ std::vector<SpecialType> _types;
+ std::vector<SpecialType> _remove_types;
+ Raul::URI _subject;
+ Resource::Properties _properties;
+ Resource::Properties _remove;
+ Ingen::Resource* _object;
+ PatchImpl* _patch;
+ CompiledPatch* _compiled_patch;
+ Resource::Graph _context;
+ ControlBindings::Key _binding;
+ bool _create;
SharedPtr<ControlBindings::Bindings> _old_bindings;
};
diff --git a/src/shared/wscript b/src/shared/wscript
index 751951e1..8a873653 100644
--- a/src/shared/wscript
+++ b/src/shared/wscript
@@ -9,7 +9,6 @@ sources = [
'Configuration.cpp',
'Forge.cpp',
'LV2Features.cpp',
- 'ResourceImpl.cpp',
'Store.cpp',
'URIMap.cpp',
'URIs.cpp',
@@ -24,6 +23,7 @@ def build(bld):
includes = ['../..'],
name = 'libingen_shared',
target = 'ingen_shared',
+ use = 'libingen',
vnum = '0.0.0',
install_path = '${LIBDIR}',
lib = ['dl'])
@@ -36,6 +36,7 @@ def build(bld):
includes = ['../..'],
name = 'libingen_shared_profiled',
target = 'ingen_shared_profiled',
+ use = 'libingen',
install_path = '',
lib = ['dl'] + bld.env['INGEN_TEST_LIBS'],
cxxflags = bld.env['INGEN_TEST_CXXFLAGS'])
diff --git a/wscript b/wscript
index 112062ba..fd0b45a5 100644
--- a/wscript
+++ b/wscript
@@ -143,6 +143,7 @@ def build(bld):
bld.path.ant_glob('ingen/%s/*' % i))
# Modules
+ bld.recurse('src')
bld.recurse('src/shared')
bld.recurse('src/serialisation')
bld.recurse('src/server')