summaryrefslogtreecommitdiffstats
path: root/src/server
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 /src/server
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
Diffstat (limited to 'src/server')
-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
5 files changed, 26 insertions, 27 deletions
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;
};