summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-18 12:47:15 +0000
committerDavid Robillard <d@drobilla.net>2011-04-18 12:47:15 +0000
commit8ba6bb943889bfdd58cf4a971a152041c1199cfe (patch)
tree91fbe8577e6d01070aa81f532ddd8102db1476f5
parent3cd3bfe5079f84fafb7dc217f5393d6ba947109c (diff)
downloadingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.tar.gz
ingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.tar.bz2
ingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.zip
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
-rw-r--r--doc/reference.doxygen.in12
-rw-r--r--include/ingen/ClientInterface.hpp2
-rw-r--r--include/ingen/CommonInterface.hpp2
-rw-r--r--include/ingen/Connection.hpp2
-rw-r--r--include/ingen/EngineInterface.hpp2
-rw-r--r--include/ingen/EventType.hpp2
-rw-r--r--include/ingen/GraphObject.hpp2
-rw-r--r--include/ingen/Node.hpp2
-rw-r--r--include/ingen/Patch.hpp2
-rw-r--r--include/ingen/Plugin.hpp2
-rw-r--r--include/ingen/Port.hpp4
-rw-r--r--include/ingen/PortType.hpp2
-rw-r--r--include/ingen/Resource.hpp2
-rw-r--r--src/bindings/Client.hpp6
-rw-r--r--src/bindings/ingen.i2
-rw-r--r--src/client/ClientStore.cpp16
-rw-r--r--src/client/ClientStore.hpp38
-rw-r--r--src/client/ConnectionModel.hpp2
-rw-r--r--src/client/HTTPClientReceiver.cpp6
-rw-r--r--src/client/HTTPClientReceiver.hpp10
-rw-r--r--src/client/HTTPEngineSender.cpp10
-rw-r--r--src/client/HTTPEngineSender.hpp16
-rw-r--r--src/client/NodeModel.cpp4
-rw-r--r--src/client/NodeModel.hpp9
-rw-r--r--src/client/OSCClientReceiver.cpp5
-rw-r--r--src/client/OSCClientReceiver.hpp4
-rw-r--r--src/client/OSCEngineSender.cpp14
-rw-r--r--src/client/OSCEngineSender.hpp16
-rw-r--r--src/client/ObjectModel.hpp2
-rw-r--r--src/client/PatchModel.cpp4
-rw-r--r--src/client/PatchModel.hpp12
-rw-r--r--src/client/PluginModel.hpp10
-rw-r--r--src/client/PluginUI.hpp6
-rw-r--r--src/client/PortModel.hpp18
-rw-r--r--src/client/SigClientInterface.hpp22
-rw-r--r--src/client/ThreadedSigClientInterface.hpp24
-rw-r--r--src/client/ingen_client.cpp8
-rw-r--r--src/engine/AudioBuffer.cpp6
-rw-r--r--src/engine/AudioBuffer.hpp6
-rw-r--r--src/engine/Buffer.hpp16
-rw-r--r--src/engine/BufferFactory.cpp13
-rw-r--r--src/engine/BufferFactory.hpp25
-rw-r--r--src/engine/ClientBroadcaster.cpp3
-rw-r--r--src/engine/ClientBroadcaster.hpp24
-rw-r--r--src/engine/CompiledPatch.hpp2
-rw-r--r--src/engine/ConnectionImpl.cpp6
-rw-r--r--src/engine/ConnectionImpl.hpp4
-rw-r--r--src/engine/Context.hpp2
-rw-r--r--src/engine/ControlBindings.cpp14
-rw-r--r--src/engine/ControlBindings.hpp2
-rw-r--r--src/engine/Driver.hpp10
-rw-r--r--src/engine/DuplexPort.cpp4
-rw-r--r--src/engine/DuplexPort.hpp8
-rw-r--r--src/engine/Engine.cpp14
-rw-r--r--src/engine/Engine.hpp39
-rw-r--r--src/engine/EngineStore.cpp4
-rw-r--r--src/engine/EngineStore.hpp9
-rw-r--r--src/engine/Event.cpp2
-rw-r--r--src/engine/Event.hpp2
-rw-r--r--src/engine/EventBuffer.cpp4
-rw-r--r--src/engine/EventBuffer.hpp6
-rw-r--r--src/engine/EventSink.cpp2
-rw-r--r--src/engine/EventSink.hpp2
-rw-r--r--src/engine/EventSource.cpp2
-rw-r--r--src/engine/EventSource.hpp2
-rw-r--r--src/engine/GraphObjectImpl.cpp11
-rw-r--r--src/engine/GraphObjectImpl.hpp10
-rw-r--r--src/engine/HTTPClientSender.cpp6
-rw-r--r--src/engine/HTTPClientSender.hpp23
-rw-r--r--src/engine/HTTPEngineReceiver.cpp4
-rw-r--r--src/engine/HTTPEngineReceiver.hpp2
-rw-r--r--src/engine/InputPort.cpp7
-rw-r--r--src/engine/InputPort.hpp4
-rw-r--r--src/engine/InternalPlugin.cpp12
-rw-r--r--src/engine/InternalPlugin.hpp4
-rw-r--r--src/engine/JackDriver.cpp6
-rw-r--r--src/engine/JackDriver.hpp4
-rw-r--r--src/engine/LV2BlobFeature.hpp6
-rw-r--r--src/engine/LV2EventFeature.hpp6
-rw-r--r--src/engine/LV2Info.cpp2
-rw-r--r--src/engine/LV2Info.hpp5
-rw-r--r--src/engine/LV2Node.cpp10
-rw-r--r--src/engine/LV2Node.hpp4
-rw-r--r--src/engine/LV2Plugin.cpp12
-rw-r--r--src/engine/LV2Plugin.hpp4
-rw-r--r--src/engine/LV2RequestRunFeature.hpp10
-rw-r--r--src/engine/LV2ResizeFeature.hpp6
-rw-r--r--src/engine/MessageContext.cpp2
-rw-r--r--src/engine/MessageContext.hpp2
-rw-r--r--src/engine/NodeFactory.cpp4
-rw-r--r--src/engine/NodeFactory.hpp2
-rw-r--r--src/engine/NodeImpl.cpp6
-rw-r--r--src/engine/NodeImpl.hpp16
-rw-r--r--src/engine/OSCClientSender.cpp26
-rw-r--r--src/engine/OSCClientSender.hpp21
-rw-r--r--src/engine/OSCEngineReceiver.cpp8
-rw-r--r--src/engine/OSCEngineReceiver.hpp2
-rw-r--r--src/engine/ObjectBuffer.cpp4
-rw-r--r--src/engine/ObjectBuffer.hpp6
-rw-r--r--src/engine/ObjectSender.cpp8
-rw-r--r--src/engine/ObjectSender.hpp27
-rw-r--r--src/engine/OutputPort.cpp5
-rw-r--r--src/engine/OutputPort.hpp4
-rw-r--r--src/engine/PatchImpl.cpp13
-rw-r--r--src/engine/PatchImpl.hpp11
-rw-r--r--src/engine/PatchPlugin.hpp6
-rw-r--r--src/engine/PluginImpl.cpp2
-rw-r--r--src/engine/PluginImpl.hpp13
-rw-r--r--src/engine/PortImpl.cpp10
-rw-r--r--src/engine/PortImpl.hpp8
-rw-r--r--src/engine/PostProcessor.cpp2
-rw-r--r--src/engine/PostProcessor.hpp2
-rw-r--r--src/engine/ProcessContext.cpp4
-rw-r--r--src/engine/ProcessContext.hpp2
-rw-r--r--src/engine/ProcessSlave.cpp2
-rw-r--r--src/engine/ProcessSlave.hpp2
-rw-r--r--src/engine/QueuedEngineInterface.cpp16
-rw-r--r--src/engine/QueuedEngineInterface.hpp24
-rw-r--r--src/engine/QueuedEvent.cpp2
-rw-r--r--src/engine/QueuedEvent.hpp2
-rw-r--r--src/engine/Request.hpp16
-rw-r--r--src/engine/ThreadManager.hpp2
-rw-r--r--src/engine/events/Connect.cpp4
-rw-r--r--src/engine/events/Connect.hpp2
-rw-r--r--src/engine/events/CreateNode.cpp4
-rw-r--r--src/engine/events/CreateNode.hpp16
-rw-r--r--src/engine/events/CreatePatch.cpp6
-rw-r--r--src/engine/events/CreatePatch.hpp16
-rw-r--r--src/engine/events/CreatePort.cpp10
-rw-r--r--src/engine/events/CreatePort.hpp20
-rw-r--r--src/engine/events/Deactivate.hpp2
-rw-r--r--src/engine/events/Delete.cpp4
-rw-r--r--src/engine/events/Delete.hpp4
-rw-r--r--src/engine/events/Disconnect.cpp2
-rw-r--r--src/engine/events/Disconnect.hpp4
-rw-r--r--src/engine/events/DisconnectAll.cpp2
-rw-r--r--src/engine/events/DisconnectAll.hpp2
-rw-r--r--src/engine/events/Get.cpp2
-rw-r--r--src/engine/events/Get.hpp2
-rw-r--r--src/engine/events/LoadPlugins.cpp2
-rw-r--r--src/engine/events/LoadPlugins.hpp2
-rw-r--r--src/engine/events/Move.cpp8
-rw-r--r--src/engine/events/Move.hpp2
-rw-r--r--src/engine/events/Ping.hpp2
-rw-r--r--src/engine/events/RegisterClient.cpp12
-rw-r--r--src/engine/events/RegisterClient.hpp16
-rw-r--r--src/engine/events/RequestMetadata.cpp8
-rw-r--r--src/engine/events/RequestMetadata.hpp29
-rw-r--r--src/engine/events/SendBinding.cpp4
-rw-r--r--src/engine/events/SendBinding.hpp2
-rw-r--r--src/engine/events/SendPortActivity.cpp2
-rw-r--r--src/engine/events/SendPortActivity.hpp2
-rw-r--r--src/engine/events/SendPortValue.cpp2
-rw-r--r--src/engine/events/SendPortValue.hpp2
-rw-r--r--src/engine/events/SetMetadata.cpp13
-rw-r--r--src/engine/events/SetMetadata.hpp26
-rw-r--r--src/engine/events/SetPortValue.cpp8
-rw-r--r--src/engine/events/SetPortValue.hpp2
-rw-r--r--src/engine/events/UnregisterClient.cpp2
-rw-r--r--src/engine/events/UnregisterClient.hpp2
-rw-r--r--src/engine/ingen_engine.cpp9
-rw-r--r--src/engine/ingen_jack.cpp7
-rw-r--r--src/engine/ingen_lv2.cpp67
-rw-r--r--src/engine/ingen_osc.cpp13
-rw-r--r--src/engine/internals/Controller.cpp6
-rw-r--r--src/engine/internals/Controller.hpp2
-rw-r--r--src/engine/internals/Delay.cpp6
-rw-r--r--src/engine/internals/Delay.hpp2
-rw-r--r--src/engine/internals/Note.cpp6
-rw-r--r--src/engine/internals/Note.hpp2
-rw-r--r--src/engine/internals/Trigger.cpp6
-rw-r--r--src/engine/internals/Trigger.hpp2
-rw-r--r--src/engine/mix.hpp4
-rw-r--r--src/engine/tuning.hpp2
-rw-r--r--src/engine/util.hpp2
-rw-r--r--src/gui/App.cpp9
-rw-r--r--src/gui/App.hpp17
-rw-r--r--src/gui/Configuration.cpp4
-rw-r--r--src/gui/ConnectWindow.cpp6
-rw-r--r--src/gui/ConnectWindow.hpp8
-rw-r--r--src/gui/ControlPanel.cpp2
-rw-r--r--src/gui/NodeModule.cpp4
-rw-r--r--src/gui/PatchPortModule.cpp2
-rw-r--r--src/gui/PortPropertiesWindow.cpp2
-rw-r--r--src/gui/PropertiesWindow.cpp2
-rw-r--r--src/ingen/main.cpp2
-rw-r--r--src/serialisation/Parser.cpp22
-rw-r--r--src/serialisation/Parser.hpp89
-rw-r--r--src/serialisation/Serialiser.cpp48
-rw-r--r--src/serialisation/Serialiser.hpp60
-rw-r--r--src/shared/Builder.hpp4
-rw-r--r--src/shared/ClashAvoider.cpp12
-rw-r--r--src/shared/ClashAvoider.hpp6
-rw-r--r--src/shared/LV2Atom.cpp1
-rw-r--r--src/shared/LV2Features.hpp3
-rw-r--r--src/shared/Store.cpp10
-rw-r--r--src/shared/Store.hpp14
-rw-r--r--src/shared/World.cpp4
-rw-r--r--src/shared/World.hpp6
199 files changed, 966 insertions, 732 deletions
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
index b31da458..bfa4c7d2 100644
--- a/doc/reference.doxygen.in
+++ b/doc/reference.doxygen.in
@@ -568,15 +568,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = \
- @INGEN_SRCDIR@/include/ingen \
- @INGEN_SRCDIR@/src/client \
- @INGEN_SRCDIR@/src/engine \
- @INGEN_SRCDIR@/src/gui \
- @INGEN_SRCDIR@/src/ingen \
- @INGEN_SRCDIR@/src/module \
- @INGEN_SRCDIR@/src/serialisation \
- @INGEN_SRCDIR@/src/shared
+INPUT = @INGEN_SRCDIR@/include
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -599,7 +591,7 @@ FILE_PATTERNS =
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
-RECURSIVE = NO
+RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
diff --git a/include/ingen/ClientInterface.hpp b/include/ingen/ClientInterface.hpp
index bddae32b..7e330536 100644
--- a/include/ingen/ClientInterface.hpp
+++ b/include/ingen/ClientInterface.hpp
@@ -27,7 +27,6 @@
namespace Raul { class Path; class URI; }
namespace Ingen {
-namespace Shared {
/** The (only) interface the engine uses to communicate with clients.
* Purely virtual (except for the destructor).
@@ -57,7 +56,6 @@ public:
virtual void activity(const Raul::Path& path) = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif
diff --git a/include/ingen/CommonInterface.hpp b/include/ingen/CommonInterface.hpp
index e1f7bba9..25b7231f 100644
--- a/include/ingen/CommonInterface.hpp
+++ b/include/ingen/CommonInterface.hpp
@@ -27,7 +27,6 @@
namespace Raul { class Atom; class Path; class URI; }
namespace Ingen {
-namespace Shared {
/** Abstract interface common to both engine and clients.
* Purely virtual (except for the destructor).
@@ -69,7 +68,6 @@ public:
const Raul::Atom& value) = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_COMMONINTERFACE_HPP
diff --git a/include/ingen/Connection.hpp b/include/ingen/Connection.hpp
index f290d80e..59b5383d 100644
--- a/include/ingen/Connection.hpp
+++ b/include/ingen/Connection.hpp
@@ -21,7 +21,6 @@
#include "raul/Path.hpp"
namespace Ingen {
-namespace Shared {
/** A connection between two ports.
*
@@ -35,7 +34,6 @@ public:
virtual const Raul::Path dst_port_path() const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_CONNECTION_HPP
diff --git a/include/ingen/EngineInterface.hpp b/include/ingen/EngineInterface.hpp
index 5bc3fbee..2146251f 100644
--- a/include/ingen/EngineInterface.hpp
+++ b/include/ingen/EngineInterface.hpp
@@ -23,7 +23,6 @@
#include "ingen/CommonInterface.hpp"
namespace Ingen {
-namespace Shared {
class ClientInterface;
@@ -68,7 +67,6 @@ public:
const Raul::URI& key) = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_ENGINEINTERFACE_HPP
diff --git a/include/ingen/EventType.hpp b/include/ingen/EventType.hpp
index 396ee4b4..bbe1fef8 100644
--- a/include/ingen/EventType.hpp
+++ b/include/ingen/EventType.hpp
@@ -21,7 +21,6 @@
#include "raul/URI.hpp"
namespace Ingen {
-namespace Shared {
/** A type of event (that can live in an EventBuffer).
*/
@@ -72,7 +71,6 @@ private:
Symbol _symbol;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_EVENTTYPE_HPP
diff --git a/include/ingen/GraphObject.hpp b/include/ingen/GraphObject.hpp
index dec28b56..393569e0 100644
--- a/include/ingen/GraphObject.hpp
+++ b/include/ingen/GraphObject.hpp
@@ -25,7 +25,6 @@
namespace Raul { class Atom; class Path; class Symbol; }
namespace Ingen {
-namespace Shared {
/** An object on the audio graph - Patch, Node, Port, etc.
*
@@ -44,7 +43,6 @@ public:
virtual GraphObject* graph_parent() const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_GRAPHOBJECT_HPP
diff --git a/include/ingen/Node.hpp b/include/ingen/Node.hpp
index 6c9b9c4a..70864766 100644
--- a/include/ingen/Node.hpp
+++ b/include/ingen/Node.hpp
@@ -23,7 +23,6 @@
#include "ingen/GraphObject.hpp"
namespace Ingen {
-namespace Shared {
class Port;
class Plugin;
@@ -45,7 +44,6 @@ public:
virtual const Plugin* plugin() const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_NODE_HPP
diff --git a/include/ingen/Patch.hpp b/include/ingen/Patch.hpp
index 51b243e2..83c80db4 100644
--- a/include/ingen/Patch.hpp
+++ b/include/ingen/Patch.hpp
@@ -26,7 +26,6 @@
#include "ingen/Node.hpp"
namespace Ingen {
-namespace Shared {
class Connection;
@@ -46,7 +45,6 @@ public:
virtual uint32_t internal_poly() const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_PATCH_HPP
diff --git a/include/ingen/Plugin.hpp b/include/ingen/Plugin.hpp
index 80f5ba9a..9b6d87b5 100644
--- a/include/ingen/Plugin.hpp
+++ b/include/ingen/Plugin.hpp
@@ -23,7 +23,6 @@
#include "ingen/Resource.hpp"
namespace Ingen {
-namespace Shared {
class Plugin : virtual public Resource
{
@@ -57,7 +56,6 @@ public:
}
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_PLUGIN_HPP
diff --git a/include/ingen/Port.hpp b/include/ingen/Port.hpp
index cbfecc9b..5d04d0f1 100644
--- a/include/ingen/Port.hpp
+++ b/include/ingen/Port.hpp
@@ -28,7 +28,6 @@
namespace Raul { class Atom; }
namespace Ingen {
-namespace Shared {
/** A Port on a Node.
*
@@ -39,7 +38,7 @@ namespace Shared {
class Port : public virtual GraphObject
{
public:
- typedef std::set<Shared::PortType> PortTypes;
+ typedef std::set<PortType> PortTypes;
virtual const PortTypes& types() const = 0;
@@ -52,7 +51,6 @@ public:
virtual const Raul::Atom& value() const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_PORT_HPP
diff --git a/include/ingen/PortType.hpp b/include/ingen/PortType.hpp
index 26f78a7f..1fc9f995 100644
--- a/include/ingen/PortType.hpp
+++ b/include/ingen/PortType.hpp
@@ -21,7 +21,6 @@
#include "raul/URI.hpp"
namespace Ingen {
-namespace Shared {
/** The type of a port.
*
@@ -92,7 +91,6 @@ private:
Symbol _symbol;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_PORTTYPE_HPP
diff --git a/include/ingen/Resource.hpp b/include/ingen/Resource.hpp
index e403e0bb..09879501 100644
--- a/include/ingen/Resource.hpp
+++ b/include/ingen/Resource.hpp
@@ -25,7 +25,6 @@
#include "raul/URI.hpp"
namespace Ingen {
-namespace Shared {
class Resource
{
@@ -92,7 +91,6 @@ public:
const Raul::Atom& value) const = 0;
};
-} // namespace Shared
} // namespace Ingen
#endif // INGEN_INTERFACE_RESOURCE_HPP
diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp
index 8ca234cc..bcf7b50a 100644
--- a/src/bindings/Client.hpp
+++ b/src/bindings/Client.hpp
@@ -3,11 +3,11 @@
/** Need a stub ClientInterface without pure virtual methods
* to allow inheritance in the script
*/
-class Client : public Ingen::Shared::ClientInterface
+class Client : public Ingen::ClientInterface
{
public:
/** Wrapper for engine->register_client to appease SWIG */
- virtual void subscribe(Ingen::Shared::EngineInterface* engine) {
+ virtual void subscribe(Ingen::yEngineInterface* engine) {
engine->register_client(this);
}
@@ -18,7 +18,7 @@ public:
void response_ok(int32_t id) {}
void response_error(int32_t id, const std::string& msg) {}
void error(const std::string& msg) {}
- void put(const Raul::URI& path, const Ingen::Shared::Resource::Properties& properties) {}
+ void put(const Raul::URI& path, const Ingen::Resource::Properties& properties) {}
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {}
void del(const Raul::Path& path) {}
void move(const Raul::Path& old_path, const Raul::Path& new_path) {}
diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i
index bafc1704..c1207415 100644
--- a/src/bindings/ingen.i
+++ b/src/bindings/ingen.i
@@ -20,7 +20,7 @@
// generate directors for all classes that have virtual methods
%feature("director");
-%feature("director") Ingen::Shared::ClientInterface;
+%feature("director") Ingen::ClientInterface;
//%feature("director") Ingen::Shared::EngineInterface;
typedef Ingen::Shared::World World;
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 7f3f78e0..32e115e6 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -43,7 +43,7 @@ using namespace Shared;
namespace Client {
ClientStore::ClientStore(SharedPtr<Shared::LV2URIMap> uris,
- SharedPtr<Shared::EngineInterface> engine,
+ SharedPtr<EngineInterface> engine,
SharedPtr<SigClientInterface> emitter)
: _uris(uris)
, _engine(engine)
@@ -101,7 +101,7 @@ ClientStore::add_object(SharedPtr<ObjectModel> object)
}
- typedef Shared::Resource::Properties::const_iterator Iterator;
+ typedef Resource::Properties::const_iterator Iterator;
for (Iterator i = object->properties().begin();
i != object->properties().end(); ++i)
object->signal_property(i->first, i->second);
@@ -177,7 +177,7 @@ ClientStore::object(const Path& path)
}
}
-SharedPtr<Shared::Resource>
+SharedPtr<Resource>
ClientStore::resource(const URI& uri)
{
if (Path::is_path(uri))
@@ -220,14 +220,14 @@ ClientStore::move(const Path& old_path_str, const Path& new_path_str)
return;
}
- typedef Table<Path, SharedPtr<Shared::GraphObject> > Removed;
+ typedef Table<Path, SharedPtr<GraphObject> > Removed;
iterator end = find_descendants_end(parent);
SharedPtr<Removed> removed = yank(parent, end);
assert(removed->size() > 0);
- typedef Table<Path, SharedPtr<Shared::GraphObject> > PathTable;
+ typedef Table<Path, SharedPtr<GraphObject> > PathTable;
for (PathTable::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(old_path, child_old_path));
@@ -247,9 +247,9 @@ ClientStore::move(const Path& old_path_str, const Path& new_path_str)
}
void
-ClientStore::put(const URI& uri,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+ClientStore::put(const URI& uri,
+ const Resource::Properties& properties,
+ Resource::Graph ctx)
{
typedef Resource::Properties::const_iterator Iterator;
#ifdef INGEN_CLIENT_STORE_DUMP
diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp
index bb74a27b..7bc21b99 100644
--- a/src/client/ClientStore.hpp
+++ b/src/client/ClientStore.hpp
@@ -36,7 +36,7 @@ namespace Raul { class Atom; }
namespace Ingen {
-namespace Shared { class GraphObject; }
+class GraphObject;
namespace Client {
@@ -52,17 +52,17 @@ class SigClientInterface;
* \ingroup IngenClient
*/
class ClientStore : public Shared::Store
- , public Shared::CommonInterface
+ , public CommonInterface
, public sigc::trackable {
public:
ClientStore(
- SharedPtr<Shared::LV2URIMap> uris,
- SharedPtr<Shared::EngineInterface> engine=SharedPtr<Shared::EngineInterface>(),
- SharedPtr<SigClientInterface> emitter=SharedPtr<SigClientInterface>());
+ SharedPtr<Shared::LV2URIMap> uris,
+ SharedPtr<EngineInterface> engine=SharedPtr<EngineInterface>(),
+ SharedPtr<SigClientInterface> emitter=SharedPtr<SigClientInterface>());
- SharedPtr<PluginModel> plugin(const Raul::URI& uri);
- SharedPtr<ObjectModel> object(const Raul::Path& path);
- SharedPtr<Shared::Resource> resource(const Raul::URI& uri);
+ SharedPtr<PluginModel> plugin(const Raul::URI& uri);
+ SharedPtr<ObjectModel> object(const Raul::Path& path);
+ SharedPtr<Resource> resource(const Raul::URI& uri);
void clear();
@@ -74,15 +74,15 @@ public:
Shared::LV2URIMap& uris() { return *_uris.get(); }
// CommonInterface
- bool new_object(const Shared::GraphObject* object);
+ bool new_object(const GraphObject* object);
- void put(const Raul::URI& uri,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT);
+ void put(const Raul::URI& uri,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT);
- void delta(const Raul::URI& uri,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add);
+ void delta(const Raul::URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add);
void move(const Raul::Path& old_path,
const Raul::Path& new_path);
@@ -103,7 +103,7 @@ public:
sigc::signal< void, SharedPtr<PluginModel> > signal_new_plugin;
private:
- void add(Shared::GraphObject* o) { throw; }
+ void add(GraphObject* o) { throw; }
void add_object(SharedPtr<ObjectModel> object);
SharedPtr<ObjectModel> remove_object(const Raul::Path& path);
@@ -123,9 +123,9 @@ private:
bool attempt_connection(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- SharedPtr<Shared::LV2URIMap> _uris;
- SharedPtr<Shared::EngineInterface> _engine;
- SharedPtr<SigClientInterface> _emitter;
+ SharedPtr<Shared::LV2URIMap> _uris;
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<SigClientInterface> _emitter;
SharedPtr<Plugins> _plugins; ///< Map, keyed by plugin URI
};
diff --git a/src/client/ConnectionModel.hpp b/src/client/ConnectionModel.hpp
index f05298c4..bc2f56e5 100644
--- a/src/client/ConnectionModel.hpp
+++ b/src/client/ConnectionModel.hpp
@@ -41,7 +41,7 @@ class ClientStore;
*
* \ingroup IngenClient
*/
-class ConnectionModel : public Shared::Connection
+class ConnectionModel : public Connection
{
public:
SharedPtr<PortModel> src_port() const { return _src_port; }
diff --git a/src/client/HTTPClientReceiver.cpp b/src/client/HTTPClientReceiver.cpp
index 76a44bea..d0c4fb73 100644
--- a/src/client/HTTPClientReceiver.cpp
+++ b/src/client/HTTPClientReceiver.cpp
@@ -46,9 +46,9 @@ static SoupSession* client_session = NULL;
static HTTPClientReceiver* client_receiver = NULL;
HTTPClientReceiver::HTTPClientReceiver(
- Shared::World* world,
- const std::string& url,
- SharedPtr<Shared::ClientInterface> target)
+ Shared::World* world,
+ const std::string& url,
+ SharedPtr<ClientInterface> target)
: _target(target)
, _world(world)
, _url(url)
diff --git a/src/client/HTTPClientReceiver.hpp b/src/client/HTTPClientReceiver.hpp
index c6df3dd7..2ad1ab19 100644
--- a/src/client/HTTPClientReceiver.hpp
+++ b/src/client/HTTPClientReceiver.hpp
@@ -37,9 +37,9 @@ namespace Client {
class HTTPClientReceiver : public boost::noncopyable, public Raul::Deletable
{
public:
- HTTPClientReceiver(Shared::World* world,
- const std::string& url,
- SharedPtr<Shared::ClientInterface> target);
+ HTTPClientReceiver(Shared::World* world,
+ const std::string& url,
+ SharedPtr<ClientInterface> target);
~HTTPClientReceiver();
@@ -70,8 +70,8 @@ private:
friend class Listener;
SharedPtr<Listener> _listener;
- Glib::Mutex _mutex;
- SharedPtr<Shared::ClientInterface> _target;
+ Glib::Mutex _mutex;
+ SharedPtr<ClientInterface> _target;
Shared::World* _world;
const std::string _url;
diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp
index bbb0f28a..144bf37b 100644
--- a/src/client/HTTPEngineSender.cpp
+++ b/src/client/HTTPEngineSender.cpp
@@ -31,7 +31,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+
using namespace Shared;
+
namespace Client {
HTTPEngineSender::HTTPEngineSender(World* world, const URI& engine_url)
@@ -104,7 +106,7 @@ HTTPEngineSender::quit()
void
HTTPEngineSender::put(const URI& uri,
const Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+ Resource::Graph ctx)
{
const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str();
const string full_uri = _engine_url.str() + "/" + path;
@@ -123,9 +125,9 @@ HTTPEngineSender::put(const URI& uri,
}
void
-HTTPEngineSender::delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+HTTPEngineSender::delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
warn << "FIXME: HTTP DELTA" << endl;
}
diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp
index 58cdf407..e12815b1 100644
--- a/src/client/HTTPEngineSender.hpp
+++ b/src/client/HTTPEngineSender.hpp
@@ -44,7 +44,7 @@ class HTTPClientReceiver;
*
* \ingroup IngenClient
*/
-class HTTPEngineSender : public Shared::EngineInterface
+class HTTPEngineSender : public EngineInterface
{
public:
HTTPEngineSender(Shared::World* world, const Raul::URI& engine_url);
@@ -72,7 +72,7 @@ public:
void transfer_end() {}
// Client registration
- void register_client(Shared::ClientInterface* client);
+ void register_client(ClientInterface* client);
void unregister_client(const Raul::URI& uri);
// Engine commands
@@ -83,13 +83,13 @@ public:
// Object commands
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ 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 del(const Raul::Path& path);
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index 51016f03..34c70765 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -154,11 +154,11 @@ NodeModel::get_port(const Raul::Symbol& symbol) const
return SharedPtr<PortModel>();
}
-Shared::Port*
+Ingen::Port*
NodeModel::port(uint32_t index) const
{
assert(index < num_ports());
- return dynamic_cast<Shared::Port*>(_ports[index].get());
+ return dynamic_cast<Ingen::Port*>(_ports[index].get());
}
void
diff --git a/src/client/NodeModel.hpp b/src/client/NodeModel.hpp
index e283323a..2a47bc04 100644
--- a/src/client/NodeModel.hpp
+++ b/src/client/NodeModel.hpp
@@ -44,7 +44,8 @@ class ClientStore;
*
* \ingroup IngenClient
*/
-class NodeModel : public ObjectModel, virtual public Ingen::Shared::Node
+class NodeModel : public ObjectModel,
+ virtual public Ingen::Node
{
public:
NodeModel(const NodeModel& copy);
@@ -54,11 +55,11 @@ public:
SharedPtr<PortModel> get_port(const Raul::Symbol& symbol) const;
- Shared::Port* port(uint32_t index) const;
+ Port* port(uint32_t index) const;
const Raul::URI& plugin_uri() const { return _plugin_uri; }
- const Shared::Plugin* plugin() const { return _plugin.get(); }
- Shared::Plugin* plugin() { return _plugin.get(); }
+ const Plugin* plugin() const { return _plugin.get(); }
+ Plugin* plugin() { return _plugin.get(); }
SharedPtr<PluginModel> plugin_model() const { return _plugin; }
uint32_t num_ports() const { return _ports.size(); }
const Ports& ports() const { return _ports; }
diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp
index 7a68692f..36661e70 100644
--- a/src/client/OSCClientReceiver.cpp
+++ b/src/client/OSCClientReceiver.cpp
@@ -36,9 +36,8 @@ using namespace Raul;
namespace Ingen {
namespace Client {
-using namespace Shared;
-
-OSCClientReceiver::OSCClientReceiver(int listen_port, SharedPtr<Shared::ClientInterface> target)
+OSCClientReceiver::OSCClientReceiver(int listen_port,
+ SharedPtr<ClientInterface> target)
: _target(target)
, _listen_port(listen_port)
, _st(NULL)
diff --git a/src/client/OSCClientReceiver.hpp b/src/client/OSCClientReceiver.hpp
index d9230e2a..9f256c15 100644
--- a/src/client/OSCClientReceiver.hpp
+++ b/src/client/OSCClientReceiver.hpp
@@ -54,7 +54,7 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
class OSCClientReceiver : public boost::noncopyable, public Raul::Deletable
{
public:
- OSCClientReceiver(int listen_port, SharedPtr<Shared::ClientInterface> target);
+ OSCClientReceiver(int listen_port, SharedPtr<ClientInterface> target);
~OSCClientReceiver();
std::string uri() const { return lo_server_thread_get_url(_st); }
@@ -73,7 +73,7 @@ private:
static int generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data);
static int unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* osc_receiver);
- SharedPtr<Shared::ClientInterface> _target;
+ SharedPtr<ClientInterface> _target;
int _listen_port;
lo_server_thread _st;
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp
index 31a64333..724035e5 100644
--- a/src/client/OSCEngineSender.cpp
+++ b/src/client/OSCEngineSender.cpp
@@ -85,7 +85,7 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
* traversal. It is a parameter to remain compatible with EngineInterface.
*/
void
-OSCEngineSender::register_client(Shared::ClientInterface* client)
+OSCEngineSender::register_client(ClientInterface* client)
{
send("/register_client", "i", next_id(), LO_ARGS_END);
}
@@ -124,11 +124,11 @@ OSCEngineSender::quit()
// Object commands
void
-OSCEngineSender::put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+OSCEngineSender::put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx)
{
- typedef Shared::Resource::Properties::const_iterator iterator;
+ typedef Resource::Properties::const_iterator iterator;
lo_message m = lo_message_new();
lo_message_add_int32(m, next_id());
lo_message_add_string(m, path.c_str());
@@ -141,8 +141,8 @@ OSCEngineSender::put(const Raul::URI& path,
void
OSCEngineSender::delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
warn << "FIXME: OSC DELTA" << endl;
}
diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp
index 883749be..8c50592c 100644
--- a/src/client/OSCEngineSender.hpp
+++ b/src/client/OSCEngineSender.hpp
@@ -34,7 +34,7 @@ namespace Client {
*
* \ingroup IngenClient
*/
-class OSCEngineSender : public Shared::EngineInterface, public Shared::OSCSender {
+class OSCEngineSender : public EngineInterface, public Shared::OSCSender {
public:
OSCEngineSender(const Raul::URI& engine_url);
~OSCEngineSender();
@@ -64,7 +64,7 @@ public:
void transfer_end() { OSCSender::transfer_end(); }
// Client registration
- void register_client(Shared::ClientInterface* client);
+ void register_client(ClientInterface* client);
void unregister_client(const Raul::URI& uri);
// Engine commands
@@ -75,13 +75,13 @@ public:
// Object commands
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ 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 del(const Raul::Path& path);
diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp
index af22f01f..f6610463 100644
--- a/src/client/ObjectModel.hpp
+++ b/src/client/ObjectModel.hpp
@@ -49,7 +49,7 @@ class ClientStore;
*
* \ingroup IngenClient
*/
-class ObjectModel : virtual public Ingen::Shared::GraphObject
+class ObjectModel : virtual public GraphObject
, public Ingen::Shared::ResourceImpl
{
public:
diff --git a/src/client/PatchModel.cpp b/src/client/PatchModel.cpp
index 08b78692..190bc3ba 100644
--- a/src/client/PatchModel.cpp
+++ b/src/client/PatchModel.cpp
@@ -93,7 +93,7 @@ PatchModel::clear()
}
SharedPtr<ConnectionModel>
-PatchModel::get_connection(const Shared::Port* src_port, const Shared::Port* dst_port)
+PatchModel::get_connection(const Port* src_port, const Ingen::Port* dst_port)
{
Connections::iterator i = _connections->find(make_pair(src_port, dst_port));
if (i != _connections->end())
@@ -137,7 +137,7 @@ PatchModel::add_connection(SharedPtr<ConnectionModel> cm)
}
void
-PatchModel::remove_connection(const Shared::Port* src_port, const Shared::Port* dst_port)
+PatchModel::remove_connection(const Port* src_port, const Ingen::Port* dst_port)
{
Connections::iterator i = _connections->find(make_pair(src_port, dst_port));
if (i != _connections->end()) {
diff --git a/src/client/PatchModel.hpp b/src/client/PatchModel.hpp
index ec8031c4..775cfe29 100644
--- a/src/client/PatchModel.hpp
+++ b/src/client/PatchModel.hpp
@@ -28,7 +28,7 @@
namespace Ingen {
-namespace Shared { class Port; }
+class Port;
namespace Client {
@@ -38,15 +38,15 @@ class ClientStore;
*
* \ingroup IngenClient
*/
-class PatchModel : public NodeModel, public Ingen::Shared::Patch
+class PatchModel : public NodeModel, public Ingen::Patch
{
public:
/* WARNING: Copy constructor creates a shallow copy WRT connections */
const Connections& connections() const { return *_connections.get(); }
- SharedPtr<ConnectionModel> get_connection(const Shared::Port* src_port,
- const Shared::Port* dst_port);
+ SharedPtr<ConnectionModel> get_connection(const Ingen::Port* src_port,
+ const Ingen::Port* dst_port);
//uint32_t poly() const { return _poly; }
bool enabled() const;
@@ -87,8 +87,8 @@ private:
bool remove_child(SharedPtr<ObjectModel> c);
void add_connection(SharedPtr<ConnectionModel> cm);
- void remove_connection(const Shared::Port* src_port,
- const Shared::Port* dst_port);
+ void remove_connection(const Ingen::Port* src_port,
+ const Ingen::Port* dst_port);
SharedPtr<Connections> _connections;
bool _editable;
diff --git a/src/client/PluginModel.hpp b/src/client/PluginModel.hpp
index 3a4a80b5..49675ebc 100644
--- a/src/client/PluginModel.hpp
+++ b/src/client/PluginModel.hpp
@@ -45,15 +45,15 @@ class PluginUI;
*
* \ingroup IngenClient
*/
-class PluginModel : public Ingen::Shared::Plugin
+class PluginModel : public Ingen::Plugin
, public Ingen::Shared::ResourceImpl
{
public:
PluginModel(
- Shared::LV2URIMap& uris,
- const Raul::URI& uri,
- const Raul::URI& type_uri,
- const Shared::Resource::Properties& properties);
+ Shared::LV2URIMap& uris,
+ const Raul::URI& uri,
+ const Raul::URI& type_uri,
+ const Ingen::Resource::Properties& properties);
Type type() const { return _type; }
diff --git a/src/client/PluginUI.hpp b/src/client/PluginUI.hpp
index 13adb436..266756e9 100644
--- a/src/client/PluginUI.hpp
+++ b/src/client/PluginUI.hpp
@@ -24,7 +24,11 @@
#include "LV2Features.hpp"
namespace Ingen {
-namespace Shared { class EngineInterface; class World; }
+
+class EngineInterface;
+
+namespace Shared { class World; }
+
namespace Client {
class NodeModel;
diff --git a/src/client/PortModel.hpp b/src/client/PortModel.hpp
index 8a62aed1..264f532e 100644
--- a/src/client/PortModel.hpp
+++ b/src/client/PortModel.hpp
@@ -35,7 +35,7 @@ namespace Client {
*
* \ingroup IngenClient
*/
-class PortModel : public ObjectModel, public Ingen::Shared::Port
+class PortModel : public ObjectModel, public Ingen::Port
{
public:
enum Direction { INPUT, OUTPUT };
@@ -52,7 +52,7 @@ public:
bool port_property(const std::string& uri) const;
- bool is_numeric() const { return is_a(Shared::PortType::CONTROL); }
+ bool is_numeric() const { return is_a(PortType::CONTROL); }
bool is_logarithmic() const { return port_property("http://drobilla.net/ns/ingen#logarithmic"); }
bool is_integer() const { return port_property("http://lv2plug.in/ns/lv2core#integer"); }
bool is_toggle() const { return port_property("http://lv2plug.in/ns/lv2core#toggled"); }
@@ -86,7 +86,7 @@ private:
friend class ClientStore;
PortModel(Shared::LV2URIMap& uris,
- const Raul::Path& path, uint32_t index, Shared::PortType type, Direction dir)
+ const Raul::Path& path, uint32_t index, PortType type, Direction dir)
: ObjectModel(uris, path)
, _index(index)
, _direction(dir)
@@ -94,7 +94,7 @@ private:
, _connections(0)
{
_types.insert(type);
- if (type == Shared::PortType::UNKNOWN)
+ if (type == PortType::UNKNOWN)
Raul::warn << "[PortModel] Unknown port type" << std::endl;
}
@@ -106,11 +106,11 @@ private:
void set(SharedPtr<ObjectModel> model);
- uint32_t _index;
- std::set<Shared::PortType> _types;
- Direction _direction;
- Raul::Atom _current_val;
- size_t _connections;
+ uint32_t _index;
+ std::set<PortType> _types;
+ Direction _direction;
+ Raul::Atom _current_val;
+ size_t _connections;
};
} // namespace Client
diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp
index e58cc3ac..57a972f6 100644
--- a/src/client/SigClientInterface.hpp
+++ b/src/client/SigClientInterface.hpp
@@ -35,7 +35,8 @@ namespace Client {
* The signals here match the calls to ClientInterface exactly. See the
* documentation for ClientInterface for meanings of signal parameters.
*/
-class SigClientInterface : public Ingen::Shared::ClientInterface, public sigc::trackable
+class SigClientInterface : public Ingen::ClientInterface,
+ public sigc::trackable
{
public:
SigClientInterface() {}
@@ -49,10 +50,10 @@ public:
sigc::signal<void, std::string> signal_error;
sigc::signal<void, Raul::Path, uint32_t> signal_new_patch;
sigc::signal<void, Raul::Path, Raul::URI, uint32_t, bool> signal_new_port;
- sigc::signal<void, Raul::URI, Shared::Resource::Properties,
- Shared::Resource::Graph> signal_put;
- sigc::signal<void, Raul::URI, Shared::Resource::Properties,
- Shared::Resource::Properties> signal_delta;
+ sigc::signal<void, Raul::URI, Resource::Properties,
+ Resource::Graph> signal_put;
+ sigc::signal<void, Raul::URI, Resource::Properties,
+ Resource::Properties> signal_delta;
sigc::signal<void, Raul::Path, Raul::Path> signal_object_moved;
sigc::signal<void, Raul::Path> signal_object_deleted;
sigc::signal<void, Raul::Path, Raul::Path> signal_connection;
@@ -89,13 +90,14 @@ protected:
void error(const std::string& msg)
{ EMIT(error, msg); }
- void put(const Raul::URI& uri,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT)
+ void put(const Raul::URI& uri,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT)
{ EMIT(put, uri, properties, ctx); }
- void delta(const Raul::URI& uri,
- const Shared::Resource::Properties& remove, const Shared::Resource::Properties& add)
+ void delta(const Raul::URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{ EMIT(delta, uri, remove, add); }
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp
index 0f8843a7..e7dc336d 100644
--- a/src/client/ThreadedSigClientInterface.hpp
+++ b/src/client/ThreadedSigClientInterface.hpp
@@ -31,7 +31,9 @@
typedef sigc::slot<void> Closure;
namespace Ingen {
-namespace Shared { class EngineInterface; }
+
+class EngineInterface;
+
namespace Client {
/** A LibSigC++ signal emitting interface for clients to use.
@@ -82,14 +84,14 @@ public:
void error(const std::string& msg)
{ push_sig(sigc::bind(error_slot, msg)); }
- void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT)
+ void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT)
{ push_sig(sigc::bind(put_slot, path, properties, ctx)); }
- void delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+ void delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{ push_sig(sigc::bind(delta_slot, path, remove, add)); }
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
@@ -128,10 +130,10 @@ private:
sigc::slot<void, std::string> error_slot;
sigc::slot<void, Raul::URI, Raul::URI, Raul::Symbol> new_plugin_slot;
sigc::slot<void, Raul::Path, Raul::URI, uint32_t, bool> new_port_slot;
- sigc::slot<void, Raul::URI, Shared::Resource::Properties,
- Shared::Resource::Graph> put_slot;
- sigc::slot<void, Raul::URI, Shared::Resource::Properties,
- Shared::Resource::Properties> delta_slot;
+ sigc::slot<void, Raul::URI, Resource::Properties,
+ Resource::Graph> put_slot;
+ sigc::slot<void, Raul::URI, Resource::Properties,
+ Resource::Properties> delta_slot;
sigc::slot<void, Raul::Path, Raul::Path> connection_slot;
sigc::slot<void, Raul::Path> object_deleted_slot;
sigc::slot<void, Raul::Path, Raul::Path> object_moved_slot;
diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp
index f8bd06a3..f1aa5c11 100644
--- a/src/client/ingen_client.cpp
+++ b/src/client/ingen_client.cpp
@@ -29,22 +29,22 @@
using namespace Ingen;
#ifdef HAVE_LIBLO
-SharedPtr<Ingen::Shared::EngineInterface>
+SharedPtr<Ingen::EngineInterface>
new_osc_interface(Ingen::Shared::World* world, const std::string& url)
{
Client::OSCEngineSender* oes = Client::OSCEngineSender::create(url);
oes->attach(rand(), true);
- return SharedPtr<Shared::EngineInterface>(oes);
+ return SharedPtr<EngineInterface>(oes);
}
#endif
#ifdef HAVE_SOUP
-SharedPtr<Ingen::Shared::EngineInterface>
+SharedPtr<Ingen::EngineInterface>
new_http_interface(Ingen::Shared::World* world, const std::string& url)
{
Client::HTTPEngineSender* hes = new Client::HTTPEngineSender(world, url);
hes->attach(rand(), true);
- return SharedPtr<Shared::EngineInterface>(hes);
+ return SharedPtr<EngineInterface>(hes);
}
#endif
diff --git a/src/engine/AudioBuffer.cpp b/src/engine/AudioBuffer.cpp
index 3a818e6f..172e41ac 100644
--- a/src/engine/AudioBuffer.cpp
+++ b/src/engine/AudioBuffer.cpp
@@ -32,10 +32,9 @@ using namespace Raul;
* stops sucking. Probably a good idea to inline them as well */
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-AudioBuffer::AudioBuffer(BufferFactory& bufs, Shared::PortType type, size_t size)
+AudioBuffer::AudioBuffer(BufferFactory& bufs, PortType type, size_t size)
: ObjectBuffer(bufs, size)
, _state(OK)
, _set_value(0)
@@ -204,4 +203,5 @@ AudioBuffer::prepare_read(Context& context)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/AudioBuffer.hpp b/src/engine/AudioBuffer.hpp
index 9bf356ee..d0c562a9 100644
--- a/src/engine/AudioBuffer.hpp
+++ b/src/engine/AudioBuffer.hpp
@@ -28,11 +28,12 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class AudioBuffer : public ObjectBuffer
{
public:
- AudioBuffer(BufferFactory& bufs, Shared::PortType type, size_t capacity);
+ AudioBuffer(BufferFactory& bufs, PortType type, size_t capacity);
void clear();
@@ -42,7 +43,7 @@ public:
void copy(Context& context, const Buffer* src);
void accumulate(Context& context, const AudioBuffer* src);
- inline bool is_control() const { return _type.symbol() == Shared::PortType::CONTROL; }
+ inline bool is_control() const { return _type.symbol() == PortType::CONTROL; }
inline Sample* data() const {
return (is_control())
@@ -102,6 +103,7 @@ AudioBuffer::accumulate(Context& context, const AudioBuffer* const src)
}
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_AUDIOBUFFER_HPP
diff --git a/src/engine/Buffer.hpp b/src/engine/Buffer.hpp
index e4ac8fb0..6449d885 100644
--- a/src/engine/Buffer.hpp
+++ b/src/engine/Buffer.hpp
@@ -29,6 +29,7 @@
#include "BufferFactory.hpp"
namespace Ingen {
+namespace Engine {
class Context;
class Engine;
@@ -37,7 +38,7 @@ class BufferFactory;
class Buffer : public boost::noncopyable, public Raul::Deletable
{
public:
- Buffer(BufferFactory& bufs, Shared::PortType type, size_t size)
+ Buffer(BufferFactory& bufs, PortType type, size_t size)
: _factory(bufs)
, _type(type)
, _size(size)
@@ -50,8 +51,8 @@ public:
virtual void resize(size_t size) { _size = size; }
- virtual void* port_data(Shared::PortType port_type, SampleCount offset=0) = 0;
- virtual const void* port_data(Shared::PortType port_type, SampleCount offset=0) const = 0;
+ virtual void* port_data(PortType port_type, SampleCount offset=0) = 0;
+ virtual const void* port_data(PortType port_type, SampleCount offset=0) const = 0;
/** Rewind (ie reset read pointer), but leave contents unchanged */
virtual void rewind() const {}
@@ -61,7 +62,7 @@ public:
virtual void prepare_read(Context& context) {}
virtual void prepare_write(Context& context) {}
- Shared::PortType type() const { return _type; }
+ PortType type() const { return _type; }
size_t size() const { return _size; }
inline void ref() { ++_refs; }
@@ -74,7 +75,7 @@ public:
protected:
BufferFactory& _factory;
- Shared::PortType _type;
+ PortType _type;
size_t _size;
friend class BufferFactory;
@@ -85,11 +86,12 @@ private:
size_t _refs; ///< Intrusive reference count for intrusive_ptr
};
+} // namespace Engine
} // namespace Ingen
namespace boost {
- inline void intrusive_ptr_add_ref(Ingen::Buffer* b) { b->ref(); }
- inline void intrusive_ptr_release(Ingen::Buffer* b) { b->deref(); }
+inline void intrusive_ptr_add_ref(Ingen::Engine::Buffer* b) { b->ref(); }
+inline void intrusive_ptr_release(Ingen::Engine::Buffer* b) { b->deref(); }
}
#endif // INGEN_ENGINE_BUFFER_HPP
diff --git a/src/engine/BufferFactory.cpp b/src/engine/BufferFactory.cpp
index 33b2a571..9eb51b54 100644
--- a/src/engine/BufferFactory.cpp
+++ b/src/engine/BufferFactory.cpp
@@ -29,12 +29,12 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-BufferFactory::BufferFactory(Engine& engine, SharedPtr<Shared::LV2URIMap> a_uris)
+BufferFactory::BufferFactory(Engine& engine,
+ SharedPtr<Ingen::Shared::LV2URIMap> uris)
: _engine(engine)
- , _uris(a_uris)
+ , _uris(uris)
, _silent_buffer(NULL)
{
assert(_uris);
@@ -85,7 +85,7 @@ BufferFactory::default_buffer_size(PortType type)
}
BufferFactory::Ref
-BufferFactory::get(Shared::PortType type, size_t size, bool force_create)
+BufferFactory::get(PortType type, size_t size, bool force_create)
{
Raul::AtomicPtr<Buffer>& head_ptr = free_list(type);
Buffer* try_head = NULL;
@@ -115,7 +115,7 @@ BufferFactory::get(Shared::PortType type, size_t size, bool force_create)
}
BufferFactory::Ref
-BufferFactory::create(Shared::PortType type, size_t size)
+BufferFactory::create(PortType type, size_t size)
{
ThreadManager::assert_not_thread(THREAD_PROCESS);
@@ -157,4 +157,5 @@ BufferFactory::recycle(Buffer* buf)
} while (!head_ptr.compare_and_exchange(try_head, buf));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/BufferFactory.hpp b/src/engine/BufferFactory.hpp
index 8a2c9207..5d6ebf7c 100644
--- a/src/engine/BufferFactory.hpp
+++ b/src/engine/BufferFactory.hpp
@@ -28,16 +28,18 @@
namespace Ingen {
-using namespace Shared;
+namespace Shared { class LV2URIMap; }
+
+namespace Engine {
class Engine;
class Buffer;
-namespace Shared { class LV2URIMap; }
-
class BufferFactory {
public:
- BufferFactory(Engine& engine, SharedPtr<Shared::LV2URIMap> uris);
+ BufferFactory(Engine& engine,
+ SharedPtr<Ingen::Shared::LV2URIMap> uris);
+
~BufferFactory();
typedef boost::intrusive_ptr<Buffer> Ref;
@@ -45,21 +47,21 @@ public:
static size_t audio_buffer_size(SampleCount nframes);
size_t default_buffer_size(PortType type);
- Ref get(Shared::PortType type, size_t size=0, bool force_create=false);
+ Ref get(PortType type, size_t size=0, bool force_create=false);
Ref silent_buffer() { return _silent_buffer; }
void set_block_length(SampleCount block_length);
- Shared::LV2URIMap& uris() { assert(_uris); return *_uris.get(); }
+ Ingen::Shared::LV2URIMap& uris() { assert(_uris); return *_uris.get(); }
private:
friend class Buffer;
void recycle(Buffer* buf);
- Ref create(Shared::PortType type, size_t size=0);
+ Ref create(PortType type, size_t size=0);
- inline Raul::AtomicPtr<Buffer>& free_list(Shared::PortType type) {
+ inline Raul::AtomicPtr<Buffer>& free_list(PortType type) {
switch (type.symbol()) {
case PortType::AUDIO: return _free_audio;
case PortType::CONTROL: return _free_control;
@@ -77,13 +79,14 @@ private:
Raul::AtomicPtr<Buffer> _free_event;
Raul::AtomicPtr<Buffer> _free_object;
- Glib::Mutex _mutex;
- Engine& _engine;
- SharedPtr<Shared::LV2URIMap> _uris;
+ Glib::Mutex _mutex;
+ Engine& _engine;
+ SharedPtr<Ingen::Shared::LV2URIMap> _uris;
Ref _silent_buffer;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_BUFFERFACTORY_HPP
diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp
index c6d731a3..85c23f3f 100644
--- a/src/engine/ClientBroadcaster.cpp
+++ b/src/engine/ClientBroadcaster.cpp
@@ -30,9 +30,9 @@
using namespace std;
using namespace Raul;
-using Ingen::Shared::ClientInterface;
namespace Ingen {
+namespace Engine {
/** Register a client to receive messages over the notification band.
*/
@@ -112,4 +112,5 @@ ClientBroadcaster::send_object(const GraphObjectImpl* o, bool recursive)
ObjectSender::send_object((*i).second, o, recursive);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index 86feb716..1c77c46b 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -29,6 +29,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class NodeImpl;
@@ -44,16 +45,16 @@ class ConnectionImpl;
*
* \ingroup engine
*/
-class ClientBroadcaster : public Shared::ClientInterface
+class ClientBroadcaster : public ClientInterface
{
public:
- void register_client(const Raul::URI& uri, Shared::ClientInterface* client);
+ void register_client(const Raul::URI& uri, ClientInterface* client);
bool unregister_client(const Raul::URI& uri);
- Shared::ClientInterface* client(const Raul::URI& uri);
+ ClientInterface* client(const Raul::URI& uri);
void send_plugins(const NodeFactory::Plugins& plugin_list);
- void send_plugins_to(Shared::ClientInterface*, const NodeFactory::Plugins& plugin_list);
+ void send_plugins_to(ClientInterface*, const NodeFactory::Plugins& plugin_list);
void send_object(const GraphObjectImpl* p, bool recursive);
@@ -66,15 +67,15 @@ public:
void bundle_begin() { BROADCAST(bundle_begin); }
void bundle_end() { BROADCAST(bundle_end); }
- void put(const Raul::URI& uri,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT) {
+ void put(const Raul::URI& uri,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT) {
BROADCAST(put, uri, properties);
}
- void delta(const Raul::URI& uri,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add) {
+ void delta(const Raul::URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add) {
BROADCAST(delta, uri, remove, add);
}
@@ -116,10 +117,11 @@ public:
void activity(const Raul::Path& path) { BROADCAST(activity, path); }
private:
- typedef std::map<Raul::URI, Shared::ClientInterface*> Clients;
+ typedef std::map<Raul::URI, ClientInterface*> Clients;
Clients _clients;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CLIENTBROADCASTER_HPP
diff --git a/src/engine/CompiledPatch.hpp b/src/engine/CompiledPatch.hpp
index ebfa8cb3..274816fb 100644
--- a/src/engine/CompiledPatch.hpp
+++ b/src/engine/CompiledPatch.hpp
@@ -24,6 +24,7 @@
#include <boost/utility.hpp>
namespace Ingen {
+namespace Engine {
class ConnectionImpl;
@@ -69,6 +70,7 @@ struct CompiledPatch : public std::vector<CompiledNode>
std::vector<ConnectionImpl*> queued_connections;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_COMPILEDPATCH_HPP
diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp
index 316a4923..90ac75ea 100644
--- a/src/engine/ConnectionImpl.cpp
+++ b/src/engine/ConnectionImpl.cpp
@@ -34,8 +34,7 @@
#include "util.hpp"
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Constructor for a connection from a node's output port.
*
@@ -122,7 +121,7 @@ ConnectionImpl::queue(Context& context)
bool
ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst)
{
- const LV2URIMap& uris = src->bufs().uris();
+ const Ingen::Shared::LV2URIMap& uris = src->bufs().uris();
return (
// (Audio | Control) => (Audio | Control)
( (src->is_a(PortType::CONTROL) || src->is_a(PortType::AUDIO))
@@ -149,5 +148,6 @@ ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst)
|| (src->supports(uris.atom_Vector) && dst->is_a(PortType::AUDIO)));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp
index 231263d5..d28196fc 100644
--- a/src/engine/ConnectionImpl.hpp
+++ b/src/engine/ConnectionImpl.hpp
@@ -31,6 +31,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class PortImpl;
class OutputPort;
@@ -48,7 +49,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class ConnectionImpl : public Raul::Deletable, public Shared::Connection
+class ConnectionImpl : public Raul::Deletable, public Connection
{
public:
ConnectionImpl(BufferFactory& bufs, PortImpl* src_port, PortImpl* dst_port);
@@ -103,6 +104,7 @@ protected:
bool _pending_disconnection;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONNECTIONIMPL_HPP
diff --git a/src/engine/Context.hpp b/src/engine/Context.hpp
index bb49fa58..8ef99f1d 100644
--- a/src/engine/Context.hpp
+++ b/src/engine/Context.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
@@ -97,6 +98,7 @@ protected:
bool _realtime; ///< True iff context is hard realtime
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONTEXT_HPP
diff --git a/src/engine/ControlBindings.cpp b/src/engine/ControlBindings.cpp
index 44aefb40..6c5b2f95 100644
--- a/src/engine/ControlBindings.cpp
+++ b/src/engine/ControlBindings.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
ControlBindings::ControlBindings(Engine& engine)
: _engine(engine)
@@ -53,7 +54,7 @@ ControlBindings::~ControlBindings()
ControlBindings::Key
ControlBindings::port_binding(PortImpl* port)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
const Raul::Atom& binding = port->get_property(uris.ingen_controlBinding);
Key key;
if (binding.type() == Atom::DICT) {
@@ -109,7 +110,7 @@ ControlBindings::port_binding_changed(ProcessContext& context, PortImpl* port)
void
ControlBindings::port_value_changed(ProcessContext& context, PortImpl* port)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
Key key = port_binding(port);
if (key) {
int16_t value = port_value_to_control(port, key.type);
@@ -163,7 +164,7 @@ ControlBindings::learn(PortImpl* port)
Raul::Atom
ControlBindings::control_to_port_value(PortImpl* port, Type type, int16_t value)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
// TODO: cache these to avoid the lookup
float min = port->get_property(uris.lv2_minimum).get_float();
@@ -199,7 +200,7 @@ ControlBindings::port_value_to_control(PortImpl* port, Type type)
if (port->value().type() != Atom::FLOAT)
return 0;
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
// TODO: cache these to avoid the lookup
float min = port->get_property(uris.lv2_minimum).get_float();
@@ -253,7 +254,7 @@ ControlBindings::set_port_value(ProcessContext& context, PortImpl* port, Type ty
bool
ControlBindings::bind(ProcessContext& context, Key key)
{
- const Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
assert(_learn_port);
if (key.type == MIDI_NOTE) {
bool toggled = _learn_port->has_property(uris.lv2_portProperty, uris.lv2_toggled);
@@ -327,7 +328,7 @@ ControlBindings::pre_process(ProcessContext& context, EventBuffer* buffer)
SharedPtr<Bindings> bindings = _bindings;
_feedback->clear();
- const Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
// TODO: cache
const uint32_t midi_event_type = uris.global_to_event(uris.midi_MidiEvent.id).second;
@@ -379,4 +380,5 @@ ControlBindings::post_process(ProcessContext& context, EventBuffer* buffer)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ControlBindings.hpp b/src/engine/ControlBindings.hpp
index e2d2d596..2b2946ec 100644
--- a/src/engine/ControlBindings.hpp
+++ b/src/engine/ControlBindings.hpp
@@ -26,6 +26,7 @@
#include "BufferFactory.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
class ProcessContext;
@@ -95,6 +96,7 @@ private:
EventBuffer* _feedback;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONTROLBINDINGS_HPP
diff --git a/src/engine/Driver.hpp b/src/engine/Driver.hpp
index 3b869046..f47f2b44 100644
--- a/src/engine/Driver.hpp
+++ b/src/engine/Driver.hpp
@@ -28,6 +28,7 @@
namespace Raul { class Path; }
namespace Ingen {
+namespace Engine {
class DuplexPort;
class ProcessContext;
@@ -92,12 +93,12 @@ public:
virtual void add_port(DriverPort* port) = 0;
/** Remove a system visible port. */
- virtual Raul::Deletable* remove_port(const Raul::Path& path,
- Ingen::DriverPort** port=NULL) = 0;
+ virtual Raul::Deletable* remove_port(const Raul::Path& path,
+ DriverPort** port=NULL) = 0;
/** Return true iff this driver supports the given type of I/O */
- virtual bool supports(Shared::PortType port_type,
- Shared::EventType event_type) = 0;
+ virtual bool supports(PortType port_type,
+ EventType event_type) = 0;
virtual void set_root_patch(PatchImpl* patch) = 0;
virtual PatchImpl* root_patch() = 0;
@@ -116,6 +117,7 @@ public:
virtual ProcessContext& context() = 0;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_DRIVER_HPP
diff --git a/src/engine/DuplexPort.cpp b/src/engine/DuplexPort.cpp
index 869147bd..ecd8da27 100644
--- a/src/engine/DuplexPort.cpp
+++ b/src/engine/DuplexPort.cpp
@@ -32,8 +32,7 @@
using namespace std;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
DuplexPort::DuplexPort(
BufferFactory& bufs,
@@ -95,5 +94,6 @@ DuplexPort::post_process(Context& context)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/DuplexPort.hpp b/src/engine/DuplexPort.hpp
index 416c4099..4341c6e3 100644
--- a/src/engine/DuplexPort.hpp
+++ b/src/engine/DuplexPort.hpp
@@ -24,6 +24,7 @@
#include "OutputPort.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -44,7 +45,7 @@ public:
uint32_t index,
bool polyphonic,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size,
bool is_output);
@@ -53,8 +54,8 @@ public:
bool get_buffers(BufferFactory& bufs, Raul::Array<BufferFactory::Ref>* buffers, uint32_t poly);
- void pre_process(Ingen::Context& context);
- void post_process(Ingen::Context& context);
+ void pre_process(Context& context);
+ void post_process(Context& context);
bool is_input() const { return !_is_output; }
bool is_output() const { return _is_output; }
@@ -63,6 +64,7 @@ protected:
bool _is_output;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_DUPLEXPORT_HPP
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index 8585b5a3..72f04f69 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -51,8 +51,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
bool ThreadManager::single_threaded = true;
@@ -69,7 +68,7 @@ Engine::Engine(Ingen::Shared::World* a_world)
if (a_world->store()) {
assert(PtrCast<EngineStore>(a_world->store()));
} else {
- a_world->set_store(SharedPtr<Shared::Store>(new EngineStore()));
+ a_world->set_store(SharedPtr<Ingen::Shared::Store>(new EngineStore()));
}
}
@@ -145,7 +144,7 @@ Engine::activate()
for (EventSources::iterator i = _event_sources.begin(); i != _event_sources.end(); ++i)
(*i)->activate_source();
- const LV2URIMap& uris = *world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *world()->uris().get();
// Create root patch
PatchImpl* root_patch = _driver->root_patch();
@@ -163,12 +162,12 @@ Engine::activate()
ProcessContext context(*this);
- Shared::Resource::Properties control_properties;
+ Resource::Properties control_properties;
control_properties.insert(make_pair(uris.lv2_name, "Control"));
control_properties.insert(make_pair(uris.rdf_type, uris.ev_EventPort));
// Add control input
- Shared::Resource::Properties in_properties(control_properties);
+ Resource::Properties in_properties(control_properties);
in_properties.insert(make_pair(uris.rdf_type, uris.lv2_InputPort));
in_properties.insert(make_pair(uris.lv2_index, 0));
in_properties.insert(make_pair(uris.ingenui_canvas_x,
@@ -181,7 +180,7 @@ Engine::activate()
"/control_in", uris.ev_EventPort, false, in_properties));
// Add control out
- Shared::Resource::Properties out_properties(control_properties);
+ Resource::Properties out_properties(control_properties);
out_properties.insert(make_pair(uris.rdf_type, uris.lv2_OutputPort));
out_properties.insert(make_pair(uris.lv2_index, 1));
out_properties.insert(make_pair(uris.ingenui_canvas_x,
@@ -223,4 +222,5 @@ Engine::process_events(ProcessContext& context)
(*i)->process(*_post_processor, context);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp
index 513d82be..af8bc48f 100644
--- a/src/engine/Engine.hpp
+++ b/src/engine/Engine.hpp
@@ -33,6 +33,8 @@ namespace Ingen {
namespace Shared { class World; }
+namespace Engine {
+
class BufferFactory;
class ClientBroadcaster;
class ControlBindings;
@@ -74,28 +76,28 @@ public:
void process_events(ProcessContext& context);
- ClientBroadcaster* broadcaster() const { return _broadcaster; }
- BufferFactory* buffer_factory() const { return _buffer_factory; }
- ControlBindings* control_bindings() const { return _control_bindings; }
- Driver* driver() const { return _driver.get(); }
- Raul::Maid* maid() const { return _maid; }
- MessageContext* message_context() const { return _message_context; }
- NodeFactory* node_factory() const { return _node_factory; }
- PostProcessor* post_processor() const { return _post_processor; }
- Shared::World* world() const { return _world; }
+ ClientBroadcaster* broadcaster() const { return _broadcaster; }
+ BufferFactory* buffer_factory() const { return _buffer_factory; }
+ ControlBindings* control_bindings() const { return _control_bindings; }
+ Driver* driver() const { return _driver.get(); }
+ Raul::Maid* maid() const { return _maid; }
+ MessageContext* message_context() const { return _message_context; }
+ NodeFactory* node_factory() const { return _node_factory; }
+ PostProcessor* post_processor() const { return _post_processor; }
+ Ingen::Shared::World* world() const { return _world; }
SharedPtr<EngineStore> engine_store() const;
private:
- ClientBroadcaster* _broadcaster;
- BufferFactory* _buffer_factory;
- ControlBindings* _control_bindings;
- SharedPtr<Driver> _driver;
- Raul::Maid* _maid;
- MessageContext* _message_context;
- NodeFactory* _node_factory;
- PostProcessor* _post_processor;
- Shared::World* _world;
+ ClientBroadcaster* _broadcaster;
+ BufferFactory* _buffer_factory;
+ ControlBindings* _control_bindings;
+ SharedPtr<Driver> _driver;
+ Raul::Maid* _maid;
+ MessageContext* _message_context;
+ NodeFactory* _node_factory;
+ PostProcessor* _post_processor;
+ Ingen::Shared::World* _world;
typedef std::set< SharedPtr<EventSource> > EventSources;
EventSources _event_sources;
@@ -103,6 +105,7 @@ private:
bool _quit_flag;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_ENGINE_HPP
diff --git a/src/engine/EngineStore.cpp b/src/engine/EngineStore.cpp
index e6066bb6..010edbc0 100644
--- a/src/engine/EngineStore.cpp
+++ b/src/engine/EngineStore.cpp
@@ -33,6 +33,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
/** Find the Patch at the given path.
*/
@@ -73,7 +74,7 @@ EngineStore::find_object(const Path& path)
/** Add an object to the store. Not realtime safe.
*/
void
-EngineStore::add(Shared::GraphObject* obj)
+EngineStore::add(GraphObject* obj)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
Store::add(obj);
@@ -155,4 +156,5 @@ EngineStore::remove_children(iterator object)
return SharedPtr<EngineStore::Objects>();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EngineStore.hpp b/src/engine/EngineStore.hpp
index 0aaf7fd7..c6d1e024 100644
--- a/src/engine/EngineStore.hpp
+++ b/src/engine/EngineStore.hpp
@@ -24,7 +24,9 @@
namespace Ingen {
-namespace Shared { class GraphObject; }
+class GraphObject;
+
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -40,7 +42,7 @@ class GraphObjectImpl;
* Searching with find*() is fast (O(log(n)) binary search on contiguous
* memory) and realtime safe, but modification (add or remove) are neither.
*/
-class EngineStore : public Shared::Store
+class EngineStore : public Ingen::Shared::Store
{
public:
PatchImpl* find_patch(const Raul::Path& path);
@@ -48,7 +50,7 @@ public:
PortImpl* find_port(const Raul::Path& path);
GraphObjectImpl* find_object(const Raul::Path& path);
- void add(Shared::GraphObject* o);
+ void add(Ingen::GraphObject* o);
void add(const Objects& family);
SharedPtr<Objects> remove(const Raul::Path& path);
@@ -57,6 +59,7 @@ public:
SharedPtr<Objects> remove_children(Objects::iterator i);
};
+} // namespace Engine
} // namespace Ingen
#endif // OBJECTSTORE
diff --git a/src/engine/Event.cpp b/src/engine/Event.cpp
index aff8a204..76af56c0 100644
--- a/src/engine/Event.cpp
+++ b/src/engine/Event.cpp
@@ -29,6 +29,7 @@
*/
namespace Ingen {
+namespace Engine {
void
Event::execute(ProcessContext& context)
@@ -50,5 +51,6 @@ Event::post_process()
ThreadManager::assert_not_thread(THREAD_PROCESS);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/Event.hpp b/src/engine/Event.hpp
index 0c7841fc..d6664683 100644
--- a/src/engine/Event.hpp
+++ b/src/engine/Event.hpp
@@ -25,6 +25,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
class Request;
@@ -73,6 +74,7 @@ protected:
bool _executed;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENT_HPP
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index a2cbcf17..50f938ce 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -28,8 +28,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Allocate a new event buffer.
* \a capacity is in bytes (not number of events).
@@ -212,4 +211,5 @@ EventBuffer::append(uint32_t frames,
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventBuffer.hpp b/src/engine/EventBuffer.hpp
index bad599ff..16f5afbe 100644
--- a/src/engine/EventBuffer.hpp
+++ b/src/engine/EventBuffer.hpp
@@ -25,14 +25,15 @@
#include "Buffer.hpp"
namespace Ingen {
+namespace Engine {
class EventBuffer : public Buffer {
public:
EventBuffer(BufferFactory& bufs, size_t capacity);
~EventBuffer();
- void* port_data(Shared::PortType port_type, SampleCount offset=0) { return _data; }
- const void* port_data(Shared::PortType port_type, SampleCount offset=0) const { return _data; }
+ void* port_data(PortType port_type, SampleCount offset=0) { return _data; }
+ const void* port_data(PortType port_type, SampleCount offset=0) const { return _data; }
inline void rewind() const { lv2_event_begin(&_iter, _data); }
@@ -79,6 +80,7 @@ private:
uint32_t _latest_subframes; ///< Latest time of all events (subframes)
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTBUFFER_HPP
diff --git a/src/engine/EventSink.cpp b/src/engine/EventSink.cpp
index 4d168f7d..bf31beaa 100644
--- a/src/engine/EventSink.cpp
+++ b/src/engine/EventSink.cpp
@@ -21,6 +21,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
/** \a size is not size_t because an event will never be even remotely close
* to UINT32_MAX in size, so uint32_t saves wasted space on 64-bit.
@@ -57,4 +58,5 @@ EventSink::read(uint32_t event_buffer_size, uint8_t* event_buffer)
return false;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventSink.hpp b/src/engine/EventSink.hpp
index 7887ae11..50edea77 100644
--- a/src/engine/EventSink.hpp
+++ b/src/engine/EventSink.hpp
@@ -24,6 +24,7 @@
#include "raul/RingBuffer.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
class Engine;
@@ -51,6 +52,7 @@ private:
Raul::RingBuffer _events;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTSINK_HPP
diff --git a/src/engine/EventSource.cpp b/src/engine/EventSource.cpp
index bc346dc3..33ab94ab 100644
--- a/src/engine/EventSource.cpp
+++ b/src/engine/EventSource.cpp
@@ -25,6 +25,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
EventSource::EventSource(size_t queue_size)
: _blocking_semaphore(0)
@@ -121,5 +122,6 @@ EventSource::_whipped()
_blocking_semaphore.wait();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventSource.hpp b/src/engine/EventSource.hpp
index 0801bab0..e05b3500 100644
--- a/src/engine/EventSource.hpp
+++ b/src/engine/EventSource.hpp
@@ -23,6 +23,7 @@
#include "raul/List.hpp"
namespace Ingen {
+namespace Engine {
class Event;
class QueuedEvent;
@@ -68,6 +69,7 @@ private:
Raul::Semaphore _blocking_semaphore;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTSOURCE_HPP
diff --git a/src/engine/GraphObjectImpl.cpp b/src/engine/GraphObjectImpl.cpp
index 0d62f47e..6b8e8a08 100644
--- a/src/engine/GraphObjectImpl.cpp
+++ b/src/engine/GraphObjectImpl.cpp
@@ -25,11 +25,11 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-GraphObjectImpl::GraphObjectImpl(Shared::LV2URIMap& uris,
- GraphObjectImpl* parent, const Symbol& symbol)
+GraphObjectImpl::GraphObjectImpl(Ingen::Shared::LV2URIMap& uris,
+ GraphObjectImpl* parent,
+ const Symbol& symbol)
: ResourceImpl(uris, parent ? parent->path().child(symbol) : Raul::Path::root())
, _parent(parent)
, _path(parent ? parent->path().child(symbol) : "/")
@@ -64,9 +64,10 @@ GraphObjectImpl::parent_patch() const
}
SharedPtr<GraphObject>
-GraphObjectImpl::find_child(const string& name) const
+GraphObjectImpl::find_child(const std::string& name) const
{
throw;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/GraphObjectImpl.hpp b/src/engine/GraphObjectImpl.hpp
index 66b38af1..88e18ff4 100644
--- a/src/engine/GraphObjectImpl.hpp
+++ b/src/engine/GraphObjectImpl.hpp
@@ -34,6 +34,8 @@ namespace Ingen {
namespace Shared { class LV2URIMap; }
+namespace Engine {
+
class PatchImpl;
class Context;
class ProcessContext;
@@ -47,7 +49,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class GraphObjectImpl : virtual public Ingen::Shared::GraphObject
+class GraphObjectImpl : virtual public GraphObject
, public Ingen::Shared::ResourceImpl
{
public:
@@ -96,14 +98,16 @@ public:
virtual bool apply_poly(Raul::Maid& maid, uint32_t poly) = 0;
protected:
- GraphObjectImpl(Shared::LV2URIMap& uris,
- GraphObjectImpl* parent, const Raul::Symbol& symbol);
+ GraphObjectImpl(Ingen::Shared::LV2URIMap& uris,
+ GraphObjectImpl* parent,
+ const Raul::Symbol& symbol);
GraphObjectImpl* _parent;
Raul::Path _path;
Raul::Symbol _symbol;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_GRAPHOBJECTIMPL_HPP
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 7e6ebe7f..c9e0eaa2 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -29,8 +29,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
void
HTTPClientSender::response_ok(int32_t id)
@@ -52,7 +51,7 @@ HTTPClientSender::error(const std::string& msg)
void
HTTPClientSender::put(const URI& uri,
const Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+ Resource::Graph ctx)
{
const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str();
const string full_uri = _url + "/" + path;
@@ -135,4 +134,5 @@ HTTPClientSender::move(const Path& old_path, const Path& new_path)
send_chunk(msg);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index dfed7a13..274d54cd 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -27,9 +27,11 @@
namespace Ingen {
-class Engine;
+class EngineInterface;
+
+namespace Engine {
-namespace Shared { class EngineInterface; }
+class Engine;
/** Implements ClientInterface for HTTP clients.
* Sends changes as RDF deltas over an HTTP stream
@@ -38,8 +40,8 @@ namespace Shared { class EngineInterface; }
* \ingroup engine
*/
class HTTPClientSender
- : public Shared::ClientInterface
- , public Shared::HTTPSender
+ : public ClientInterface
+ , public Ingen::Shared::HTTPSender
{
public:
explicit HTTPClientSender(Engine& engine)
@@ -66,13 +68,13 @@ public:
void error(const std::string& msg);
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx);
+ virtual void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx);
- 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 del(const Raul::Path& path);
@@ -97,6 +99,7 @@ private:
bool _enabled;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_HTTPCLIENTSENDER_HPP
diff --git a/src/engine/HTTPEngineReceiver.cpp b/src/engine/HTTPEngineReceiver.cpp
index 2a8d1718..196a8ad6 100644
--- a/src/engine/HTTPEngineReceiver.cpp
+++ b/src/engine/HTTPEngineReceiver.cpp
@@ -46,9 +46,10 @@ using namespace Raul;
namespace Ingen {
-using namespace Shared;
using namespace Serialisation;
+namespace Engine {
+
HTTPEngineReceiver::HTTPEngineReceiver(Engine& engine, uint16_t port)
: QueuedEngineInterface(engine, 64) // FIXME
, _server(soup_server_new(SOUP_SERVER_PORT, port, NULL))
@@ -233,5 +234,6 @@ HTTPEngineReceiver::ReceiveThread::_run()
soup_server_run(_receiver._server);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/HTTPEngineReceiver.hpp b/src/engine/HTTPEngineReceiver.hpp
index 3942987a..0c6bcfd7 100644
--- a/src/engine/HTTPEngineReceiver.hpp
+++ b/src/engine/HTTPEngineReceiver.hpp
@@ -29,6 +29,7 @@ typedef struct _SoupMessage SoupMessage;
typedef struct SoupClientContext SoupClientContext;
namespace Ingen {
+namespace Engine {
class HTTPEngineReceiver : public QueuedEngineInterface
{
@@ -60,6 +61,7 @@ private:
SoupServer* _server;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_HTTPENGINERECEIVER_HPP
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp
index 7fb603b4..03855275 100644
--- a/src/engine/InputPort.cpp
+++ b/src/engine/InputPort.cpp
@@ -34,9 +34,7 @@
using namespace std;
namespace Ingen {
-
-namespace Shared { class Patch; }
-using namespace Shared;
+namespace Engine {
InputPort::InputPort(BufferFactory& bufs,
NodeImpl* parent,
@@ -49,7 +47,7 @@ InputPort::InputPort(BufferFactory& bufs,
: PortImpl(bufs, parent, symbol, index, poly, type, value, buffer_size)
, _num_connections(0)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
if (!dynamic_cast<Patch*>(parent))
add_property(uris.rdf_type, uris.lv2_InputPort);
@@ -224,5 +222,6 @@ InputPort::direct_connect() const
&& !_connections.front()->must_queue();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/InputPort.hpp b/src/engine/InputPort.hpp
index 77cc58cf..819ca8bf 100644
--- a/src/engine/InputPort.hpp
+++ b/src/engine/InputPort.hpp
@@ -26,6 +26,7 @@
#include "PortImpl.hpp"
namespace Ingen {
+namespace Engine {
class ConnectionImpl;
class Context;
@@ -52,7 +53,7 @@ public:
const Raul::Symbol& symbol,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size=0);
@@ -84,6 +85,7 @@ protected:
Connections _connections;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_INPUTPORT_HPP
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index 346163a7..f8022e71 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -30,6 +30,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
using namespace Internals;
@@ -42,11 +43,11 @@ InternalPlugin::InternalPlugin(Shared::LV2URIMap& uris,
}
NodeImpl*
-InternalPlugin::instantiate(BufferFactory& bufs,
- const string& name,
- bool polyphonic,
- Ingen::PatchImpl* parent,
- Engine& engine)
+InternalPlugin::instantiate(BufferFactory& bufs,
+ const string& name,
+ bool polyphonic,
+ PatchImpl* parent,
+ Engine& engine)
{
assert(_type == Internal);
@@ -67,4 +68,5 @@ InternalPlugin::instantiate(BufferFactory& bufs,
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp
index 53fa04ed..6301b999 100644
--- a/src/engine/InternalPlugin.hpp
+++ b/src/engine/InternalPlugin.hpp
@@ -31,6 +31,7 @@
#define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class BufferFactory;
@@ -46,7 +47,7 @@ public:
NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine);
const std::string symbol() const { return _symbol; }
@@ -55,6 +56,7 @@ private:
const std::string _symbol;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_INTERNALPLUGIN_HPP
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp
index 9fb79461..9bb81536 100644
--- a/src/engine/JackDriver.cpp
+++ b/src/engine/JackDriver.cpp
@@ -61,6 +61,7 @@ using namespace Raul;
typedef jack_default_audio_sample_t jack_sample_t;
namespace Ingen {
+namespace Engine {
//// JackPort ////
@@ -209,7 +210,7 @@ JackDriver::~JackDriver()
}
bool
-JackDriver::supports(Shared::PortType port_type, Shared::EventType event_type)
+JackDriver::supports(PortType port_type, EventType event_type)
{
return (port_type == PortType::AUDIO
|| (port_type == PortType::EVENTS && event_type == EventType::MIDI));
@@ -357,7 +358,7 @@ JackDriver::remove_port(const Path& path, DriverPort** port)
for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i)->patch_port()->path() == path) {
- Raul::List<Ingen::JackPort*>::Node* node = _ports.erase(i);
+ Raul::List<JackPort*>::Node* node = _ports.erase(i);
if (port)
*port = node->elem();
return node;
@@ -557,4 +558,5 @@ JackDriver::_session_cb(jack_session_event_t* event)
}
#endif
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/JackDriver.hpp b/src/engine/JackDriver.hpp
index 7e49fb1f..702692b8 100644
--- a/src/engine/JackDriver.hpp
+++ b/src/engine/JackDriver.hpp
@@ -40,6 +40,7 @@
namespace Raul { class Path; }
namespace Ingen {
+namespace Engine {
class Engine;
class PatchImpl;
@@ -86,7 +87,7 @@ public:
explicit JackDriver(Engine& engine);
~JackDriver();
- bool supports(Shared::PortType port_type, Shared::EventType event_type);
+ bool supports(PortType port_type, EventType event_type);
bool attach(const std::string& server_name,
const std::string& client_name,
@@ -176,6 +177,7 @@ private:
PatchImpl* _root_patch;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_JACKAUDIODRIVER_HPP
diff --git a/src/engine/LV2BlobFeature.hpp b/src/engine/LV2BlobFeature.hpp
index 1235e493..a23a3953 100644
--- a/src/engine/LV2BlobFeature.hpp
+++ b/src/engine/LV2BlobFeature.hpp
@@ -21,8 +21,9 @@
#include "shared/LV2Features.hpp"
namespace Ingen {
+namespace Engine {
-struct BlobFeature : public Shared::LV2Features::Feature {
+struct BlobFeature : public Ingen::Shared::LV2Features::Feature {
BlobFeature() {
LV2_Blob_Support* data = (LV2_Blob_Support*)malloc(sizeof(LV2_Blob_Support));
data->data = NULL;
@@ -51,7 +52,7 @@ struct BlobFeature : public Shared::LV2Features::Feature {
uint32_t type,
size_t size) {}
- SharedPtr<LV2_Feature> feature(Shared::World*, Shared::Node*) {
+ SharedPtr<LV2_Feature> feature(Shared::World*, Node*) {
return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
}
@@ -59,6 +60,7 @@ private:
LV2_Feature _feature;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2BLOBFEATURE_HPP
diff --git a/src/engine/LV2EventFeature.hpp b/src/engine/LV2EventFeature.hpp
index 28443d27..c9ac1c32 100644
--- a/src/engine/LV2EventFeature.hpp
+++ b/src/engine/LV2EventFeature.hpp
@@ -22,8 +22,9 @@
#include "shared/LV2Features.hpp"
namespace Ingen {
+namespace Engine {
-struct EventFeature : public Shared::LV2Features::Feature {
+struct EventFeature : public Ingen::Shared::LV2Features::Feature {
EventFeature() {
LV2_Event_Feature* data = (LV2_Event_Feature*)malloc(sizeof(LV2_Event_Feature));
data->lv2_event_ref = &event_ref;
@@ -39,7 +40,7 @@ struct EventFeature : public Shared::LV2Features::Feature {
static uint32_t event_unref(LV2_Event_Callback_Data callback_data,
LV2_Event* event) { return 0; }
- SharedPtr<LV2_Feature> feature(Shared::World*, Shared::Node*) {
+ SharedPtr<LV2_Feature> feature(Shared::World*, Node*) {
return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
}
@@ -47,6 +48,7 @@ private:
LV2_Feature _feature;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2EVENTFEATURE_HPP
diff --git a/src/engine/LV2Info.cpp b/src/engine/LV2Info.cpp
index ce22844c..4fd7885f 100644
--- a/src/engine/LV2Info.cpp
+++ b/src/engine/LV2Info.cpp
@@ -36,6 +36,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
LV2Info::LV2Info(Ingen::Shared::World* world)
: input_class(slv2_value_new_uri(world->slv2_world(), SLV2_PORT_CLASS_INPUT))
@@ -72,4 +73,5 @@ LV2Info::~LV2Info()
slv2_value_free(message_port_class);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Info.hpp b/src/engine/LV2Info.hpp
index a982e592..292eb012 100644
--- a/src/engine/LV2Info.hpp
+++ b/src/engine/LV2Info.hpp
@@ -30,7 +30,9 @@
namespace Ingen {
-namespace Shared { class Node; }
+class Node;
+
+namespace Engine {
/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features).
*/
@@ -54,6 +56,7 @@ private:
Ingen::Shared::World* _world;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2INFO_HPP
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp
index 7398d4df..ea292b97 100644
--- a/src/engine/LV2Node.cpp
+++ b/src/engine/LV2Node.cpp
@@ -40,8 +40,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Partially construct a LV2Node.
*
@@ -138,9 +137,9 @@ LV2Node::apply_poly(Raul::Maid& maid, uint32_t poly)
bool
LV2Node::instantiate(BufferFactory& bufs)
{
- const LV2URIMap& uris = bufs.uris();
- SharedPtr<LV2Info> info = _lv2_plugin->lv2_info();
- SLV2Plugin plug = _lv2_plugin->slv2_plugin();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
+ SharedPtr<LV2Info> info = _lv2_plugin->lv2_info();
+ SLV2Plugin plug = _lv2_plugin->slv2_plugin();
uint32_t num_ports = slv2_plugin_get_num_ports(plug);
assert(num_ports > 0);
@@ -406,5 +405,6 @@ LV2Node::set_port_buffer(uint32_t voice, uint32_t port_num,
buf ? buf->port_data(_ports->at(port_num)->buffer_type(), offset) : NULL);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Node.hpp b/src/engine/LV2Node.hpp
index beaa7819..7633f4d7 100644
--- a/src/engine/LV2Node.hpp
+++ b/src/engine/LV2Node.hpp
@@ -27,6 +27,7 @@
#include "LV2Features.hpp"
namespace Ingen {
+namespace Engine {
class LV2Plugin;
@@ -71,9 +72,10 @@ protected:
LV2_Contexts_MessageContext* _message_funcs;
- SharedPtr<Shared::LV2Features::FeatureArray> _features;
+ SharedPtr<Ingen::Shared::LV2Features::FeatureArray> _features;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2NODE_HPP
diff --git a/src/engine/LV2Plugin.cpp b/src/engine/LV2Plugin.cpp
index 0bea4c42..0efc3abf 100644
--- a/src/engine/LV2Plugin.cpp
+++ b/src/engine/LV2Plugin.cpp
@@ -32,6 +32,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri)
: PluginImpl(*lv2_info->world().uris().get(), Plugin::LV2, uri)
@@ -62,11 +63,11 @@ LV2Plugin::symbol() const
}
NodeImpl*
-LV2Plugin::instantiate(BufferFactory& bufs,
- const string& name,
- bool polyphonic,
- Ingen::PatchImpl* parent,
- Engine& engine)
+LV2Plugin::instantiate(BufferFactory& bufs,
+ const string& name,
+ bool polyphonic,
+ PatchImpl* parent,
+ Engine& engine)
{
const SampleCount srate = engine.driver()->sample_rate();
@@ -105,4 +106,5 @@ LV2Plugin::library_path() const
return _library_path;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Plugin.hpp b/src/engine/LV2Plugin.hpp
index e70f8b16..6bc9501a 100644
--- a/src/engine/LV2Plugin.hpp
+++ b/src/engine/LV2Plugin.hpp
@@ -37,6 +37,7 @@
#include "LV2Info.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -51,7 +52,7 @@ public:
NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine);
const std::string symbol() const;
@@ -68,6 +69,7 @@ private:
SharedPtr<LV2Info> _lv2_info;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2PLUGIN_HPP
diff --git a/src/engine/LV2RequestRunFeature.hpp b/src/engine/LV2RequestRunFeature.hpp
index 6d6b66b3..324676a7 100644
--- a/src/engine/LV2RequestRunFeature.hpp
+++ b/src/engine/LV2RequestRunFeature.hpp
@@ -34,12 +34,13 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-struct RequestRunFeature : public Shared::LV2Features::Feature {
+struct RequestRunFeature : public Ingen::Shared::LV2Features::Feature {
struct Data {
- inline Data(Shared::World* w, Shared::Node* n) : world(w), node(n) {}
+ inline Data(Shared::World* w, Node* n) : world(w), node(n) {}
Shared::World* world;
- Shared::Node* node;
+ Node* node;
};
static void request_run(LV2_Contexts_Request_Run_Data data_ptr,
@@ -59,7 +60,7 @@ struct RequestRunFeature : public Shared::LV2Features::Feature {
free(feature);
}
- SharedPtr<LV2_Feature> feature(Shared::World* world, Shared::Node* n) {
+ SharedPtr<LV2_Feature> feature(Shared::World* world, Node* n) {
NodeImpl* node = dynamic_cast<NodeImpl*>(n);
if (!node)
return SharedPtr<LV2_Feature>();
@@ -77,6 +78,7 @@ struct RequestRunFeature : public Shared::LV2Features::Feature {
}
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2_REQUEST_RUN_FEATURE_HPP
diff --git a/src/engine/LV2ResizeFeature.hpp b/src/engine/LV2ResizeFeature.hpp
index e5f2469d..4d303070 100644
--- a/src/engine/LV2ResizeFeature.hpp
+++ b/src/engine/LV2ResizeFeature.hpp
@@ -28,8 +28,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-struct ResizeFeature : public Shared::LV2Features::Feature {
+struct ResizeFeature : public Ingen::Shared::LV2Features::Feature {
static bool resize_port(LV2_Resize_Port_Feature_Data data,
uint32_t index,
size_t size) {
@@ -51,7 +52,7 @@ struct ResizeFeature : public Shared::LV2Features::Feature {
free(feature);
}
- SharedPtr<LV2_Feature> feature(Shared::World* w, Shared::Node* n) {
+ SharedPtr<LV2_Feature> feature(Shared::World* w, Node* n) {
NodeImpl* node = dynamic_cast<NodeImpl*>(n);
if (!node)
return SharedPtr<LV2_Feature>();
@@ -66,6 +67,7 @@ struct ResizeFeature : public Shared::LV2Features::Feature {
}
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2RESIZEFEATURE_HPP
diff --git a/src/engine/MessageContext.cpp b/src/engine/MessageContext.cpp
index 1b64ff9b..db65472a 100644
--- a/src/engine/MessageContext.cpp
+++ b/src/engine/MessageContext.cpp
@@ -31,6 +31,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
void
MessageContext::run(NodeImpl* node, FrameTime time)
@@ -121,4 +122,5 @@ MessageContext::execute(const Request& req)
node->reset_valid_ports();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/MessageContext.hpp b/src/engine/MessageContext.hpp
index 45eefb73..14cd3999 100644
--- a/src/engine/MessageContext.hpp
+++ b/src/engine/MessageContext.hpp
@@ -30,6 +30,7 @@
#include "tuning.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -107,6 +108,7 @@ protected:
FrameTime _end_time;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_MESSAGECONTEXT_HPP
diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp
index cc3e2dc2..21b8257c 100644
--- a/src/engine/NodeFactory.cpp
+++ b/src/engine/NodeFactory.cpp
@@ -45,6 +45,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
using namespace Internals;
@@ -96,7 +97,7 @@ NodeFactory::load_plugins()
void
NodeFactory::load_internal_plugins()
{
- Shared::LV2URIMap& uris = *_world->uris().get();
+ Ingen::Shared::LV2URIMap& uris = *_world->uris().get();
InternalPlugin* controller_plug = ControllerNode::internal_plugin(uris);
_plugins.insert(make_pair(controller_plug->uri(), controller_plug));
@@ -133,4 +134,5 @@ NodeFactory::load_lv2_plugins()
}
#endif // HAVE_SLV2
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/NodeFactory.hpp b/src/engine/NodeFactory.hpp
index 1271ceb2..3057319c 100644
--- a/src/engine/NodeFactory.hpp
+++ b/src/engine/NodeFactory.hpp
@@ -29,6 +29,7 @@
#include "ingen-config.h"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class PatchImpl;
@@ -69,6 +70,7 @@ private:
#endif
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_NODEFACTORY_HPP
diff --git a/src/engine/NodeImpl.cpp b/src/engine/NodeImpl.cpp
index a4e52ece..fc08c8de 100644
--- a/src/engine/NodeImpl.cpp
+++ b/src/engine/NodeImpl.cpp
@@ -33,6 +33,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
NodeImpl::NodeImpl(PluginImpl* plugin, const Raul::Symbol& symbol, bool polyphonic, PatchImpl* parent, SampleRate srate)
: GraphObjectImpl(plugin->uris(), parent, symbol)
@@ -67,13 +68,13 @@ NodeImpl::~NodeImpl()
free(_valid_ports);
}
-Shared::Port*
+Port*
NodeImpl::port(uint32_t index) const
{
return (*_ports)[index];
}
-const Shared::Plugin*
+const Plugin*
NodeImpl::plugin() const
{
return _plugin;
@@ -258,5 +259,6 @@ NodeImpl::set_port_buffer(uint32_t voice, uint32_t port_num,
<< " buffer " << buf << " offset " << offset << std::endl;*/
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/NodeImpl.hpp b/src/engine/NodeImpl.hpp
index 8ba76d41..d2c49e4f 100644
--- a/src/engine/NodeImpl.hpp
+++ b/src/engine/NodeImpl.hpp
@@ -31,7 +31,10 @@ namespace Raul { template <typename T> class List; class Maid; }
namespace Ingen {
-namespace Shared { class Plugin; class Port; }
+class Plugin;
+class Port;
+
+namespace Engine {
class Buffer;
class BufferFactory;
@@ -49,7 +52,7 @@ class ProcessContext;
*
* \ingroup engine
*/
-class NodeImpl : public GraphObjectImpl, virtual public Ingen::Shared::Node
+class NodeImpl : public GraphObjectImpl, virtual public Node
{
public:
NodeImpl(PluginImpl* plugin,
@@ -142,8 +145,8 @@ public:
IntrusivePtr<Buffer> buf,
SampleCount offset);
- virtual Shared::Port* port(uint32_t index) const;
- virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
+ virtual Port* port(uint32_t index) const;
+ virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
/** Nodes that are connected to this Node's inputs.
* (This Node depends on them)
@@ -176,12 +179,12 @@ public:
/** Information about the Plugin this Node is an instance of.
* Not the best name - not all nodes come from plugins (ie Patch)
*/
- virtual const Shared::Plugin* plugin() const;
+ virtual const Plugin* plugin() const;
virtual void plugin(PluginImpl* pi) { _plugin = pi; }
virtual void set_buffer_size(Context& context, BufferFactory& bufs,
- Shared::PortType type, size_t size);
+ PortType type, size_t size);
/** The Patch this Node belongs to. */
inline PatchImpl* parent_patch() const { return (PatchImpl*)_parent; }
@@ -214,6 +217,7 @@ protected:
bool _traversed; ///< Flag for process order algorithm
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_NODEIMPL_HPP
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index 8d2749c7..ca2eb49f 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
/*! \page client_osc_namespace Client OSC Namespace Documentation
*
@@ -104,11 +105,11 @@ OSCClientSender::error(const std::string& msg)
* PUT a set of properties to a path (see \ref methods).
*/
void
-OSCClientSender::put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+OSCClientSender::put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx)
{
- typedef Shared::Resource::Properties::const_iterator iterator;
+ typedef Resource::Properties::const_iterator iterator;
lo_message m = lo_message_new();
lo_message_add_string(m, path.c_str());
for (iterator i = properties.begin(); i != properties.end(); ++i) {
@@ -119,9 +120,9 @@ OSCClientSender::put(const Raul::URI& path,
}
void
-OSCClientSender::delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+OSCClientSender::delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
warn << "FIXME: OSC DELTA" << endl;
}
@@ -160,7 +161,8 @@ OSCClientSender::del(const Path& path)
* Notification a new connection has been made.
*/
void
-OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path)
+OSCClientSender::connect(const Path& src_port_path,
+ const Path& dst_port_path)
{
send("/connect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
@@ -173,7 +175,8 @@ OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path)
* Notification a connection has been unmade.
*/
void
-OSCClientSender::disconnect(const Path& src_port_path, const Path& dst_port_path)
+OSCClientSender::disconnect(const Path& src_port_path,
+ const Path& dst_port_path)
{
send("/disconnect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
@@ -187,7 +190,9 @@ OSCClientSender::disconnect(const Path& src_port_path, const Path& dst_port_path
* Notification of a property.
*/
void
-OSCClientSender::set_property(const URI& path, const URI& key, const Atom& value)
+OSCClientSender::set_property(const URI& path,
+ const URI& key,
+ const Atom& value)
{
lo_message m = lo_message_new();
lo_message_add_string(m, path.c_str());
@@ -211,4 +216,5 @@ OSCClientSender::activity(const Path& path)
lo_send(_address, "/activity", "s", path.c_str(), LO_ARGS_END);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index 6109345b..147c0779 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -28,13 +28,17 @@
namespace Ingen {
-namespace Shared { class EngineInterface; }
+class EngineInterface;
+
+namespace Engine {
+
/** Implements ClientInterface for OSC clients (sends OSC messages).
*
* \ingroup engine
*/
-class OSCClientSender : public Shared::ClientInterface, public Shared::OSCSender
+class OSCClientSender : public ClientInterface,
+ public Ingen::Shared::OSCSender
{
public:
explicit OSCClientSender(const Raul::URI& url)
@@ -65,13 +69,13 @@ public:
void error(const std::string& msg);
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ 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 del(const Raul::Path& path);
@@ -94,6 +98,7 @@ private:
Raul::URI _url;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OSCCLIENTSENDER_HPP
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index 0babfc10..baa6d5e1 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -44,8 +44,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/*! \page engine_osc_namespace Engine OSC Namespace Documentation
*
@@ -209,7 +208,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
/* Different address than last time, have to do a lookup */
if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) {
- Shared::ClientInterface* client = me->_engine.broadcaster()->client(url);
+ ClientInterface* client = me->_engine.broadcaster()->client(url);
if (client)
me->_request = SharedPtr<Request>(new Request(me, client, id));
else
@@ -315,7 +314,7 @@ OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_a
lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
- Shared::ClientInterface* client = new OSCClientSender((const char*)url);
+ ClientInterface* client = new OSCClientSender((const char*)url);
register_client(client);
free(url);
@@ -641,4 +640,5 @@ OSCEngineReceiver::unknown_cb(const char* path, const char* types, lo_arg** argv
return 0;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index ec51c358..e059a843 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -25,6 +25,7 @@
#include "ingen-config.h"
namespace Ingen {
+namespace Engine {
class JackDriver;
class NodeFactory;
@@ -117,6 +118,7 @@ private:
lo_server _server;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OSCENGINERECEIVER_HPP
diff --git a/src/engine/ObjectBuffer.cpp b/src/engine/ObjectBuffer.cpp
index 910e775d..ba0b0c7f 100644
--- a/src/engine/ObjectBuffer.cpp
+++ b/src/engine/ObjectBuffer.cpp
@@ -31,8 +31,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Allocate a new object buffer.
* \a capacity is in bytes, including LV2_Atom header
@@ -143,5 +142,6 @@ ObjectBuffer::prepare_write(Context& context)
_buf->size = _size - sizeof(LV2_Atom);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ObjectBuffer.hpp b/src/engine/ObjectBuffer.hpp
index f5dd2401..fe75bd71 100644
--- a/src/engine/ObjectBuffer.hpp
+++ b/src/engine/ObjectBuffer.hpp
@@ -23,6 +23,7 @@
#include "Buffer.hpp"
namespace Ingen {
+namespace Engine {
class Context;
@@ -33,8 +34,8 @@ public:
void clear();
- void* port_data(Shared::PortType port_type, SampleCount offset);
- const void* port_data(Shared::PortType port_type, SampleCount offset) const;
+ void* port_data(PortType port_type, SampleCount offset);
+ const void* port_data(PortType port_type, SampleCount offset) const;
void prepare_write(Context& context);
@@ -49,6 +50,7 @@ private:
LV2_Atom* _buf; ///< Contents
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OBJECTBUFFER_HPP
diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp
index 48514455..ae2383d6 100644
--- a/src/engine/ObjectSender.cpp
+++ b/src/engine/ObjectSender.cpp
@@ -31,11 +31,12 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
void
-ObjectSender::send_object(ClientInterface* client, const GraphObjectImpl* object, bool recursive)
+ObjectSender::send_object(ClientInterface* client,
+ const GraphObjectImpl* object,
+ bool recursive)
{
const PatchImpl* patch = dynamic_cast<const PatchImpl*>(object);
if (patch) {
@@ -143,5 +144,6 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund
client->bundle_end();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ObjectSender.hpp b/src/engine/ObjectSender.hpp
index f1721d9f..21f0e928 100644
--- a/src/engine/ObjectSender.hpp
+++ b/src/engine/ObjectSender.hpp
@@ -20,7 +20,9 @@
namespace Ingen {
-namespace Shared { class ClientInterface; }
+class ClientInterface;
+
+namespace Engine {
class GraphObjectImpl;
class PatchImpl;
@@ -39,18 +41,25 @@ class PluginImpl;
*/
class ObjectSender {
public:
- static void send_object(Shared::ClientInterface* client,
- const GraphObjectImpl* object, bool recursive);
+ static void send_object(ClientInterface* client,
+ const GraphObjectImpl* object,
+ bool recursive);
private:
- static void send_patch(Shared::ClientInterface* client,
- const PatchImpl* patch, bool recursive, bool bundle=true);
- static void send_node(Shared::ClientInterface* client,
- const NodeImpl* node, bool recursive, bool bundle=true);
- static void send_port(Shared::ClientInterface* client,
- const PortImpl* port, bool bundle=true);
+ static void send_patch(ClientInterface* client,
+ const PatchImpl* patch,
+ bool recursive,
+ bool bundle=true);
+ static void send_node(ClientInterface* client,
+ const NodeImpl* node,
+ bool recursive,
+ bool bundle=true);
+ static void send_port(ClientInterface* client,
+ const PortImpl* port,
+ bool bundle=true);
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OBJECTSENDER_HPP
diff --git a/src/engine/OutputPort.cpp b/src/engine/OutputPort.cpp
index 7d5b2512..0a16d2db 100644
--- a/src/engine/OutputPort.cpp
+++ b/src/engine/OutputPort.cpp
@@ -25,9 +25,7 @@
using namespace std;
namespace Ingen {
-
-namespace Shared { class Patch; }
-using namespace Shared;
+namespace Engine {
OutputPort::OutputPort(BufferFactory& bufs,
NodeImpl* parent,
@@ -74,4 +72,5 @@ OutputPort::post_process(Context& context)
broadcast_value(context, false);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OutputPort.hpp b/src/engine/OutputPort.hpp
index be22079e..c82de111 100644
--- a/src/engine/OutputPort.hpp
+++ b/src/engine/OutputPort.hpp
@@ -23,6 +23,7 @@
#include "PortImpl.hpp"
namespace Ingen {
+namespace Engine {
/** An output port.
*
@@ -43,7 +44,7 @@ public:
const Raul::Symbol& symbol,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size=0);
@@ -58,6 +59,7 @@ public:
bool is_output() const { return true; }
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OUTPUTPORT_HPP
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp
index 0d6ccbcb..e8461ba9 100644
--- a/src/engine/PatchImpl.cpp
+++ b/src/engine/PatchImpl.cpp
@@ -37,10 +37,14 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
-
-PatchImpl::PatchImpl(Engine& engine, const Raul::Symbol& symbol, uint32_t poly, PatchImpl* parent, SampleRate srate, uint32_t internal_poly)
+namespace Engine {
+
+PatchImpl::PatchImpl(Engine& engine,
+ const Raul::Symbol& symbol,
+ uint32_t poly,
+ PatchImpl* parent,
+ SampleRate srate,
+ uint32_t internal_poly)
: NodeImpl(new PatchPlugin(*engine.world()->uris().get(),
engine.world()->uris()->ingen_Patch.c_str(), "patch", "Ingen Patch"),
symbol, poly, parent, srate)
@@ -463,4 +467,5 @@ PatchImpl::compile() const
return compiled_patch;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PatchImpl.hpp b/src/engine/PatchImpl.hpp
index 95acc229..8429728f 100644
--- a/src/engine/PatchImpl.hpp
+++ b/src/engine/PatchImpl.hpp
@@ -29,7 +29,9 @@
namespace Ingen {
-namespace Shared { class Connection; }
+class Connection;
+
+namespace Engine {
class CompiledPatch;
class ConnectionImpl;
@@ -45,7 +47,7 @@ class ProcessContext;
*
* \ingroup engine
*/
-class PatchImpl : public NodeImpl, public Ingen::Shared::Patch
+class PatchImpl : public NodeImpl, public Patch
{
public:
PatchImpl(Engine& engine,
@@ -62,7 +64,7 @@ public:
void process(ProcessContext& context);
- void set_buffer_size(Context& context, BufferFactory& bufs, Shared::PortType type, size_t size);
+ void set_buffer_size(Context& context, BufferFactory& bufs, PortType type, size_t size);
/** Prepare for a new (internal) polyphony value.
*
@@ -97,7 +99,7 @@ public:
uint32_t num_ports() const;
- PortImpl* create_port(BufferFactory& bufs, const std::string& name, Shared::PortType type, size_t buffer_size, bool is_output, bool polyphonic);
+ PortImpl* create_port(BufferFactory& bufs, const std::string& name, PortType type, size_t buffer_size, bool is_output, bool polyphonic);
void add_input(Raul::List<PortImpl*>::Node* port) { _input_ports.push_back(port); } ///< Preprocesser thread
void add_output(Raul::List<PortImpl*>::Node* port) { _output_ports.push_back(port); } ///< Preprocessor thread
Raul::List<PortImpl*>::Node* remove_port(const std::string& name);
@@ -157,6 +159,7 @@ PatchImpl::compile_recursive(NodeImpl* n, CompiledPatch* output) const
output->push_back(CompiledNode(n, n->providers()->size(), n->dependants()));
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PATCHIMPL_HPP
diff --git a/src/engine/PatchPlugin.hpp b/src/engine/PatchPlugin.hpp
index 81c57784..ba244ef6 100644
--- a/src/engine/PatchPlugin.hpp
+++ b/src/engine/PatchPlugin.hpp
@@ -24,6 +24,7 @@
#include "PluginImpl.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -42,10 +43,10 @@ public:
: PluginImpl(uris, Plugin::Patch, uri)
{}
- NodeImpl* instantiate(BufferFactory& bufs,
+ NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine)
{
return NULL;
@@ -59,6 +60,7 @@ private:
const std::string _name;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PATCHPLUGIN_HPP
diff --git a/src/engine/PluginImpl.cpp b/src/engine/PluginImpl.cpp
index c7b0c718..e121bd62 100644
--- a/src/engine/PluginImpl.cpp
+++ b/src/engine/PluginImpl.cpp
@@ -22,6 +22,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
void
PluginImpl::load()
@@ -44,5 +45,6 @@ PluginImpl::unload()
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PluginImpl.hpp b/src/engine/PluginImpl.hpp
index a8de4b42..ab4e4a89 100644
--- a/src/engine/PluginImpl.hpp
+++ b/src/engine/PluginImpl.hpp
@@ -31,6 +31,8 @@ namespace Ingen {
namespace Shared { class LV2URIMap; }
+namespace Engine {
+
class PatchImpl;
class NodeImpl;
class Engine;
@@ -40,13 +42,15 @@ class BufferFactory;
*
* Conceptually, a Node is an instance of this.
*/
-class PluginImpl : public Ingen::Shared::Plugin
+class PluginImpl : public Plugin
, public Ingen::Shared::ResourceImpl
, public boost::noncopyable
{
public:
- PluginImpl(Shared::LV2URIMap& uris,
- Type type, const std::string& uri, const std::string library_path="")
+ PluginImpl(Ingen::Shared::LV2URIMap& uris,
+ Type type,
+ const std::string& uri,
+ const std::string library_path = "")
: ResourceImpl(uris, uri)
, _type(type)
, _library_path(library_path)
@@ -56,7 +60,7 @@ public:
virtual NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine) = 0;
virtual const std::string symbol() const = 0;
@@ -77,6 +81,7 @@ protected:
Glib::Module* _module;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PLUGINIMPL_HPP
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index e0f4f405..62cc7577 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -36,8 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
PortImpl::PortImpl(BufferFactory& bufs,
NodeImpl* const node,
@@ -68,7 +67,7 @@ PortImpl::PortImpl(BufferFactory& bufs,
if (_buffer_size == 0)
_buffer_size = bufs.default_buffer_size(type);
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
add_property(uris.rdf_type, type.uri());
set_property(uris.lv2_index, Atom((int32_t)index));
set_context(_context);
@@ -215,7 +214,7 @@ PortImpl::broadcast_value(Context& context, bool force)
break;
case PortType::VALUE:
case PortType::MESSAGE:
- LV2Atom::to_atom(_bufs.uris(), ((ObjectBuffer*)buffer(0).get())->atom(), val);
+ Ingen::Shared::LV2Atom::to_atom(_bufs.uris(), ((ObjectBuffer*)buffer(0).get())->atom(), val);
break;
}
@@ -229,7 +228,7 @@ PortImpl::broadcast_value(Context& context, bool force)
void
PortImpl::set_context(Context::ID c)
{
- const LV2URIMap& uris = _bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = _bufs.uris();
_context = c;
switch (c) {
case Context::AUDIO:
@@ -248,4 +247,5 @@ PortImpl::buffer_type() const
return *_types.begin();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PortImpl.hpp b/src/engine/PortImpl.hpp
index 127d8cc4..bf743d94 100644
--- a/src/engine/PortImpl.hpp
+++ b/src/engine/PortImpl.hpp
@@ -33,6 +33,7 @@
namespace Raul { class Maid; }
namespace Ingen {
+namespace Engine {
class NodeImpl;
class Buffer;
@@ -46,7 +47,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class PortImpl : public GraphObjectImpl, public Ingen::Shared::Port
+class PortImpl : public GraphObjectImpl, public Port
{
public:
~PortImpl();
@@ -143,7 +144,7 @@ protected:
const Raul::Symbol& name,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size);
@@ -152,7 +153,7 @@ protected:
uint32_t _poly;
uint32_t _buffer_size;
PortType _buffer_type;
- std::set<Shared::PortType> _types;
+ std::set<PortType> _types;
Raul::Atom _value;
bool _broadcast;
bool _set_by_user;
@@ -165,6 +166,7 @@ protected:
Raul::Array<BufferFactory::Ref>* _prepared_buffers;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PORTIMPL_HPP
diff --git a/src/engine/PostProcessor.cpp b/src/engine/PostProcessor.cpp
index d789637b..29179b00 100644
--- a/src/engine/PostProcessor.cpp
+++ b/src/engine/PostProcessor.cpp
@@ -30,6 +30,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
PostProcessor::PostProcessor(Engine& engine, size_t queue_size)
: _engine(engine)
@@ -87,4 +88,5 @@ PostProcessor::process()
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PostProcessor.hpp b/src/engine/PostProcessor.hpp
index ee2fce20..f0888d2f 100644
--- a/src/engine/PostProcessor.hpp
+++ b/src/engine/PostProcessor.hpp
@@ -23,6 +23,7 @@
#include "raul/List.hpp"
namespace Ingen {
+namespace Engine {
class Event;
class Engine;
@@ -61,6 +62,7 @@ private:
uint8_t* _event_buffer;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_POSTPROCESSOR_HPP
diff --git a/src/engine/ProcessContext.cpp b/src/engine/ProcessContext.cpp
index ad405f3b..2abe7cf2 100644
--- a/src/engine/ProcessContext.cpp
+++ b/src/engine/ProcessContext.cpp
@@ -19,6 +19,7 @@
#include "ProcessSlave.hpp"
namespace Ingen {
+namespace Engine {
void
ProcessContext::activate(uint32_t parallelism, bool sched_rt)
@@ -33,4 +34,5 @@ ProcessContext::activate(uint32_t parallelism, bool sched_rt)
}
}
-}
+} // namespace Engine
+} // namespace Ingen
diff --git a/src/engine/ProcessContext.hpp b/src/engine/ProcessContext.hpp
index 9faf967e..bbaa5ad2 100644
--- a/src/engine/ProcessContext.hpp
+++ b/src/engine/ProcessContext.hpp
@@ -25,6 +25,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class ProcessSlave;
@@ -47,6 +48,7 @@ private:
Slaves _slaves;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PROCESSCONTEXT_HPP
diff --git a/src/engine/ProcessSlave.cpp b/src/engine/ProcessSlave.cpp
index 0b719f0d..44197d4a 100644
--- a/src/engine/ProcessSlave.cpp
+++ b/src/engine/ProcessSlave.cpp
@@ -22,6 +22,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
uint32_t ProcessSlave::_next_id = 0;
@@ -68,4 +69,5 @@ ProcessSlave::_whipped()
_state = STATE_FINISHED;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ProcessSlave.hpp b/src/engine/ProcessSlave.hpp
index 757a7e09..39c599af 100644
--- a/src/engine/ProcessSlave.hpp
+++ b/src/engine/ProcessSlave.hpp
@@ -29,6 +29,7 @@
#include "ProcessContext.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class CompiledPatch;
@@ -97,6 +98,7 @@ private:
ProcessContext* _context;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PROCESSSLAVE_HPP
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 03f4a21d..345602fa 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -32,8 +32,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
QueuedEngineInterface::QueuedEngineInterface(Engine& engine, size_t queue_size)
: EventSource(queue_size)
@@ -142,17 +141,17 @@ QueuedEngineInterface::bundle_end()
// Object commands
void
-QueuedEngineInterface::put(const URI& uri,
- const Resource::Properties& properties,
- const Shared::Resource::Graph ctx)
+QueuedEngineInterface::put(const URI& uri,
+ const Resource::Properties& properties,
+ const Resource::Graph ctx)
{
push_queued(new Events::SetMetadata(_engine, _request, now(), true, ctx, uri, properties));
}
void
-QueuedEngineInterface::delta(const URI& uri,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+QueuedEngineInterface::delta(const URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
push_queued(new Events::SetMetadata(_engine, _request, now(), false, Resource::DEFAULT, uri, add, remove));
}
@@ -224,4 +223,5 @@ QueuedEngineInterface::request_property(const URI& uri, const URI& key)
push_queued(new Events::RequestMetadata(_engine, _request, now(), Resource::DEFAULT, uri, key));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index dd06a740..cb4e2c26 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -31,6 +31,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
@@ -44,7 +45,8 @@ class Engine;
* If you do not register a request, you have no way of knowing if your calls
* are successful.
*/
-class QueuedEngineInterface : public EventSource, public Shared::EngineInterface
+class QueuedEngineInterface : public EventSource,
+ public EngineInterface
{
public:
QueuedEngineInterface(Engine& engine, size_t queue_size);
@@ -55,7 +57,7 @@ public:
void set_next_response_id(int32_t id);
// Client registration
- virtual void register_client(Shared::ClientInterface* client);
+ virtual void register_client(ClientInterface* client);
virtual void unregister_client(const Raul::URI& uri);
// Engine commands
@@ -70,13 +72,13 @@ public:
// CommonInterface object commands
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- const Shared::Resource::Graph g=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ const Resource::Graph g=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);
@@ -87,7 +89,7 @@ public:
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- virtual void set_property(const Raul::URI& subject_path,
+ virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
@@ -101,7 +103,8 @@ public:
// Requests
virtual void ping();
virtual void get(const Raul::URI& uri);
- virtual void request_property(const Raul::URI& object_path, const Raul::URI& key);
+ virtual void request_property(const Raul::URI& object_path,
+ const Raul::URI& key);
protected:
virtual void disable_responses();
@@ -114,6 +117,7 @@ private:
SampleCount now() const;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP
diff --git a/src/engine/QueuedEvent.cpp b/src/engine/QueuedEvent.cpp
index cc015470..e08b6b30 100644
--- a/src/engine/QueuedEvent.cpp
+++ b/src/engine/QueuedEvent.cpp
@@ -20,6 +20,7 @@
#include "ProcessContext.hpp"
namespace Ingen {
+namespace Engine {
void
QueuedEvent::pre_process()
@@ -43,5 +44,6 @@ QueuedEvent::execute(ProcessContext& context)
Event::execute(context);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/QueuedEvent.hpp b/src/engine/QueuedEvent.hpp
index 3bcd16ff..99c5ff33 100644
--- a/src/engine/QueuedEvent.hpp
+++ b/src/engine/QueuedEvent.hpp
@@ -21,6 +21,7 @@
#include "Event.hpp"
namespace Ingen {
+namespace Engine {
/** An Event with a not-time-critical preprocessing stage.
*
@@ -70,6 +71,7 @@ protected:
bool _blocking;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_QUEUEDEVENT_HPP
diff --git a/src/engine/Request.hpp b/src/engine/Request.hpp
index b03bb553..3e4372c9 100644
--- a/src/engine/Request.hpp
+++ b/src/engine/Request.hpp
@@ -24,6 +24,7 @@
#include "EventSource.hpp"
namespace Ingen {
+namespace Engine {
/** Record of a request (used to respond to clients).
*
@@ -37,7 +38,9 @@ namespace Ingen {
class Request
{
public:
- Request(EventSource* source=0, Shared::ClientInterface* client=0, int32_t id=1)
+ Request(EventSource* source=0,
+ ClientInterface* client=0,
+ int32_t id=1)
: _source(source)
, _client(client)
, _id(id)
@@ -47,8 +50,8 @@ public:
int32_t id() const { return _id; }
void set_id(int32_t id) { _id = id; }
- Shared::ClientInterface* client() const { return _client; }
- void set_client(Shared::ClientInterface* client) { _client = client; }
+ ClientInterface* client() const { return _client; }
+ void set_client(ClientInterface* client) { _client = client; }
void unblock() {
if (_source)
@@ -66,11 +69,12 @@ public:
}
private:
- EventSource* _source;
- Shared::ClientInterface* _client;
- int32_t _id;
+ EventSource* _source;
+ ClientInterface* _client;
+ int32_t _id;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_REQUEST_HPP
diff --git a/src/engine/ThreadManager.hpp b/src/engine/ThreadManager.hpp
index 27235f30..9a73250d 100644
--- a/src/engine/ThreadManager.hpp
+++ b/src/engine/ThreadManager.hpp
@@ -22,6 +22,7 @@
#include "raul/Thread.hpp"
namespace Ingen {
+namespace Engine {
enum ThreadID {
THREAD_PRE_PROCESS,
@@ -49,6 +50,7 @@ public:
static bool single_threaded;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_THREADMANAGER_HPP
diff --git a/src/engine/events/Connect.cpp b/src/engine/events/Connect.cpp
index 6e802d50..0f4bd465 100644
--- a/src/engine/events/Connect.cpp
+++ b/src/engine/events/Connect.cpp
@@ -37,10 +37,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Connect::Connect(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& src_port_path, const Path& dst_port_path)
: QueuedEvent(engine, request, timestamp)
, _src_port_path(src_port_path)
@@ -199,6 +198,7 @@ Connect::post_process()
_request->respond_error(ss.str());
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Connect.hpp b/src/engine/events/Connect.hpp
index 217289f9..ec40f70b 100644
--- a/src/engine/events/Connect.hpp
+++ b/src/engine/events/Connect.hpp
@@ -30,6 +30,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -80,6 +81,7 @@ private:
Raul::Array<BufferFactory::Ref>* _buffers;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreateNode.cpp b/src/engine/events/CreateNode.cpp
index 72bf4425..68e66f0a 100644
--- a/src/engine/events/CreateNode.cpp
+++ b/src/engine/events/CreateNode.cpp
@@ -37,10 +37,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreateNode::CreateNode(
Engine& engine,
SharedPtr<Request> request,
@@ -141,6 +140,7 @@ CreateNode::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreateNode.hpp b/src/engine/events/CreateNode.hpp
index 99116409..844eca01 100644
--- a/src/engine/events/CreateNode.hpp
+++ b/src/engine/events/CreateNode.hpp
@@ -23,6 +23,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class PluginImpl;
@@ -39,12 +40,12 @@ class CreateNode : public QueuedEvent
{
public:
CreateNode(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& node_path,
- const Raul::URI& plugin_uri,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& node_path,
+ const Raul::URI& plugin_uri,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -60,9 +61,10 @@ private:
bool _node_already_exists;
bool _polyphonic;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePatch.cpp b/src/engine/events/CreatePatch.cpp
index 73345784..dcc79513 100644
--- a/src/engine/events/CreatePatch.cpp
+++ b/src/engine/events/CreatePatch.cpp
@@ -32,10 +32,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreatePatch::CreatePatch(
Engine& engine,
SharedPtr<Request> request,
@@ -81,7 +80,7 @@ CreatePatch::pre_process()
if (_parent != NULL && _poly > 1 && _poly == static_cast<int>(_parent->internal_poly()))
poly = _poly;
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
_patch = new PatchImpl(_engine, path.symbol(), poly, _parent,
_engine.driver()->sample_rate(), _poly);
@@ -159,6 +158,7 @@ CreatePatch::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePatch.hpp b/src/engine/events/CreatePatch.hpp
index 42f8604e..847583a4 100644
--- a/src/engine/events/CreatePatch.hpp
+++ b/src/engine/events/CreatePatch.hpp
@@ -22,6 +22,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class CompiledPatch;
@@ -36,12 +37,12 @@ class CreatePatch : public QueuedEvent
{
public:
CreatePatch(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- int poly,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ int poly,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -56,9 +57,10 @@ private:
CompiledPatch* _compiled_patch;
int _poly;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp
index 278fe1b9..de5b2219 100644
--- a/src/engine/events/CreatePort.cpp
+++ b/src/engine/events/CreatePort.cpp
@@ -38,10 +38,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreatePort::CreatePort(
Engine& engine,
SharedPtr<Request> request,
@@ -82,7 +81,7 @@ CreatePort::pre_process()
_patch = _engine.engine_store()->find_patch(_path.parent());
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
if (_patch != NULL) {
assert(_patch->path() == _path.parent());
@@ -93,7 +92,7 @@ CreatePort::pre_process()
? _patch->external_ports()->size()
: 0;
- Shared::Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index);
+ Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index);
if (index_i == _properties.end()) {
index_i = _properties.insert(make_pair(uris.lv2_index, (int)old_num_ports));
} else if (index_i->second.type() != Atom::INT
@@ -103,7 +102,7 @@ CreatePort::pre_process()
return;
}
- Shared::Resource::Properties::const_iterator poly_i = _properties.find(uris.ingen_polyphonic);
+ Resource::Properties::const_iterator poly_i = _properties.find(uris.ingen_polyphonic);
bool polyphonic = (poly_i != _properties.end() && poly_i->second.type() == Atom::BOOL
&& poly_i->second.get_bool());
@@ -187,6 +186,7 @@ CreatePort::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePort.hpp b/src/engine/events/CreatePort.hpp
index 4b3242f1..a4be3a30 100644
--- a/src/engine/events/CreatePort.hpp
+++ b/src/engine/events/CreatePort.hpp
@@ -25,6 +25,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class PortImpl;
@@ -40,13 +41,13 @@ class CreatePort : public QueuedEvent
{
public:
CreatePort(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- const Raul::URI& type,
- bool is_output,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Raul::URI& type,
+ bool is_output,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -63,16 +64,17 @@ private:
Raul::Path _path;
Raul::URI _type;
bool _is_output;
- Shared::PortType _data_type;
+ PortType _data_type;
PatchImpl* _patch;
PortImpl* _patch_port;
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports array for Patch
DriverPort* _driver_port; ///< Driver (eg Jack) port if this is a toplevel port
bool _succeeded;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Deactivate.hpp b/src/engine/events/Deactivate.hpp
index 58b48fb8..87bfe298 100644
--- a/src/engine/events/Deactivate.hpp
+++ b/src/engine/events/Deactivate.hpp
@@ -22,6 +22,7 @@
#include "Engine.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Deactivates the engine.
@@ -41,6 +42,7 @@ public:
}
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp
index 0d203614..50b9174a 100644
--- a/src/engine/events/Delete.cpp
+++ b/src/engine/events/Delete.cpp
@@ -33,10 +33,9 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const Raul::Path& path)
: QueuedEvent(engine, request, time, true)
, _path(path)
@@ -202,5 +201,6 @@ Delete::post_process()
_engine.maid()->push(_garbage);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Delete.hpp b/src/engine/events/Delete.hpp
index 76180818..234d8977 100644
--- a/src/engine/events/Delete.hpp
+++ b/src/engine/events/Delete.hpp
@@ -29,6 +29,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class NodeImpl;
@@ -84,9 +85,10 @@ private:
SharedPtr<ControlBindings::Bindings> _removed_bindings;
- SharedPtr< Raul::Table<Raul::Path, SharedPtr<Shared::GraphObject> > > _removed_table;
+ SharedPtr< Raul::Table<Raul::Path, SharedPtr<GraphObject> > > _removed_table;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Disconnect.cpp b/src/engine/events/Disconnect.cpp
index 3054c935..9de5d0fd 100644
--- a/src/engine/events/Disconnect.cpp
+++ b/src/engine/events/Disconnect.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
Disconnect::Disconnect(
@@ -255,6 +256,7 @@ Disconnect::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Disconnect.hpp b/src/engine/events/Disconnect.hpp
index 3e85702f..f7e965e0 100644
--- a/src/engine/events/Disconnect.hpp
+++ b/src/engine/events/Disconnect.hpp
@@ -30,6 +30,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class CompiledPatch;
class InputPort;
@@ -95,7 +96,8 @@ private:
bool _clear_dst_port;
};
-} // namespace Ingen
} // namespace Events
+} // namespace Engine
+} // namespace Ingen
#endif // INGEN_EVENTS_DISCONNECT_HPP
diff --git a/src/engine/events/DisconnectAll.cpp b/src/engine/events/DisconnectAll.cpp
index d91d4689..cc5bf42d 100644
--- a/src/engine/events/DisconnectAll.cpp
+++ b/src/engine/events/DisconnectAll.cpp
@@ -38,6 +38,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
DisconnectAll::DisconnectAll(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& parent_path, const Path& node_path)
@@ -185,6 +186,7 @@ DisconnectAll::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/DisconnectAll.hpp b/src/engine/events/DisconnectAll.hpp
index f6d4beb3..0d89901d 100644
--- a/src/engine/events/DisconnectAll.hpp
+++ b/src/engine/events/DisconnectAll.hpp
@@ -23,6 +23,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
class CompiledPatch;
class NodeImpl;
@@ -78,6 +79,7 @@ private:
bool _deleting;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Get.cpp b/src/engine/events/Get.cpp
index dea81fa0..7425dd8a 100644
--- a/src/engine/events/Get.cpp
+++ b/src/engine/events/Get.cpp
@@ -30,6 +30,7 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
Get::Get(
@@ -77,6 +78,7 @@ Get::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Get.hpp b/src/engine/events/Get.hpp
index ddd92bff..56bc5f17 100644
--- a/src/engine/events/Get.hpp
+++ b/src/engine/events/Get.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class PluginImpl;
@@ -52,6 +53,7 @@ private:
NodeFactory::Plugins _plugins;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/LoadPlugins.cpp b/src/engine/events/LoadPlugins.cpp
index 5a3ccc66..975165bf 100644
--- a/src/engine/events/LoadPlugins.cpp
+++ b/src/engine/events/LoadPlugins.cpp
@@ -22,6 +22,7 @@
#include "ClientBroadcaster.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
LoadPlugins::LoadPlugins(Engine& engine, SharedPtr<Request> request, SampleCount timestamp)
@@ -46,6 +47,7 @@ LoadPlugins::post_process()
_request->respond_ok();
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/LoadPlugins.hpp b/src/engine/events/LoadPlugins.hpp
index c7ebc2d7..47646e92 100644
--- a/src/engine/events/LoadPlugins.hpp
+++ b/src/engine/events/LoadPlugins.hpp
@@ -21,6 +21,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Loads all plugins into the internal plugin database (in NodeFactory).
@@ -38,6 +39,7 @@ public:
void post_process();
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Move.cpp b/src/engine/events/Move.cpp
index cb830f27..bccb3856 100644
--- a/src/engine/events/Move.cpp
+++ b/src/engine/events/Move.cpp
@@ -29,10 +29,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Move::Move(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& path, const Path& new_path)
: QueuedEvent(engine, request, timestamp)
, _old_path(path)
@@ -67,12 +66,12 @@ Move::pre_process()
return;
}
- SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed
+ SharedPtr< Table<Path, SharedPtr<GraphObject> > > removed
= _engine.engine_store()->remove(_store_iterator);
assert(removed->size() > 0);
- for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
+ for (Table<Path, SharedPtr<GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(_old_path, child_old_path));
@@ -126,5 +125,6 @@ Move::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Move.hpp b/src/engine/events/Move.hpp
index 20f9a7bb..03e7e1a6 100644
--- a/src/engine/events/Move.hpp
+++ b/src/engine/events/Move.hpp
@@ -23,6 +23,7 @@
#include "EngineStore.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
@@ -71,6 +72,7 @@ private:
EngineStore::iterator _store_iterator;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Ping.hpp b/src/engine/events/Ping.hpp
index 6f59a987..ad4e1361 100644
--- a/src/engine/events/Ping.hpp
+++ b/src/engine/events/Ping.hpp
@@ -23,6 +23,7 @@
#include "Request.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -43,6 +44,7 @@ public:
void post_process() { _request->respond_ok(); }
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RegisterClient.cpp b/src/engine/events/RegisterClient.cpp
index 8a052e41..50916e6a 100644
--- a/src/engine/events/RegisterClient.cpp
+++ b/src/engine/events/RegisterClient.cpp
@@ -23,13 +23,14 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-RegisterClient::RegisterClient(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const URI& uri,
- Shared::ClientInterface* client)
+RegisterClient::RegisterClient(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const URI& uri,
+ ClientInterface* client)
: QueuedEvent(engine, request, timestamp)
, _uri(uri)
, _client(client)
@@ -50,6 +51,7 @@ RegisterClient::post_process()
_request->respond_ok();
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RegisterClient.hpp b/src/engine/events/RegisterClient.hpp
index 7e168d6a..5e5c6a15 100644
--- a/src/engine/events/RegisterClient.hpp
+++ b/src/engine/events/RegisterClient.hpp
@@ -23,6 +23,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Registers a new client with the OSC system, so it can receive updates.
@@ -32,20 +33,21 @@ namespace Events {
class RegisterClient : public QueuedEvent
{
public:
- RegisterClient(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::URI& uri,
- Shared::ClientInterface* client);
+ RegisterClient(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::URI& uri,
+ ClientInterface* client);
void pre_process();
void post_process();
private:
- Raul::URI _uri;
- Shared::ClientInterface* _client;
+ Raul::URI _uri;
+ ClientInterface* _client;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RequestMetadata.cpp b/src/engine/events/RequestMetadata.cpp
index 3e36f2be..c5642104 100644
--- a/src/engine/events/RequestMetadata.cpp
+++ b/src/engine/events/RequestMetadata.cpp
@@ -35,10 +35,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
RequestMetadata::RequestMetadata(Engine& engine,
SharedPtr<Request> request,
SampleCount timestamp,
@@ -96,7 +95,9 @@ RequestMetadata::execute(ProcessContext& context)
} else {
IntrusivePtr<ObjectBuffer> obuf = PtrCast<ObjectBuffer>(port->buffer(0));
if (obuf) {
- LV2Atom::to_atom(*_engine.world()->uris().get(), obuf->atom(), _value);
+ Ingen::Shared::LV2Atom::to_atom(*_engine.world()->uris().get(),
+ obuf->atom(),
+ _value);
}
}
} else {
@@ -130,6 +131,7 @@ RequestMetadata::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RequestMetadata.hpp b/src/engine/events/RequestMetadata.hpp
index 0c0389c9..e1730207 100644
--- a/src/engine/events/RequestMetadata.hpp
+++ b/src/engine/events/RequestMetadata.hpp
@@ -18,13 +18,17 @@
#ifndef INGEN_EVENTS_REQUESTMETADATA_HPP
#define INGEN_EVENTS_REQUESTMETADATA_HPP
-#include "QueuedEvent.hpp"
#include "raul/Atom.hpp"
#include "raul/URI.hpp"
+#include "QueuedEvent.hpp"
+
namespace Ingen {
namespace Shared { class ResourceImpl; }
+
+namespace Engine {
+
class GraphObjectImpl;
namespace Events {
@@ -43,12 +47,12 @@ namespace Events {
class RequestMetadata : public QueuedEvent
{
public:
- RequestMetadata(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- Shared::Resource::Graph context,
- const Raul::URI& subject,
- const Raul::URI& key);
+ RequestMetadata(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ Resource::Graph context,
+ const Raul::URI& subject,
+ const Raul::URI& key);
void pre_process();
void execute(ProcessContext& context);
@@ -61,13 +65,14 @@ private:
PORT_VALUE
} _special_type;
- Raul::URI _uri;
- Raul::URI _key;
- Raul::Atom _value;
- Shared::ResourceImpl* _resource;
- Shared::Resource::Graph _context;
+ Raul::URI _uri;
+ Raul::URI _key;
+ Raul::Atom _value;
+ Ingen::Shared::ResourceImpl* _resource;
+ Resource::Graph _context;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendBinding.cpp b/src/engine/events/SendBinding.cpp
index 00b9d42c..b9a43366 100644
--- a/src/engine/events/SendBinding.cpp
+++ b/src/engine/events/SendBinding.cpp
@@ -25,12 +25,13 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
void
SendBinding::post_process()
{
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
Raul::Atom::DictValue dict;
if (_type == ControlBindings::MIDI_CC) {
dict[uris.rdf_type] = uris.midi_Controller;
@@ -48,6 +49,7 @@ SendBinding::post_process()
_engine.broadcaster()->set_property(_port->path(), uris.ingen_controlBinding, dict);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendBinding.hpp b/src/engine/events/SendBinding.hpp
index ef00dfd4..1cd38ff2 100644
--- a/src/engine/events/SendBinding.hpp
+++ b/src/engine/events/SendBinding.hpp
@@ -23,6 +23,7 @@
#include "engine/types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -78,6 +79,7 @@ private:
int16_t _num;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortActivity.cpp b/src/engine/events/SendPortActivity.cpp
index 69cc6292..e202c519 100644
--- a/src/engine/events/SendPortActivity.cpp
+++ b/src/engine/events/SendPortActivity.cpp
@@ -21,6 +21,7 @@
#include "ClientBroadcaster.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
void
@@ -29,6 +30,7 @@ SendPortActivity::post_process()
_engine.broadcaster()->activity(_port->path());
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortActivity.hpp b/src/engine/events/SendPortActivity.hpp
index faf6683f..a99081ba 100644
--- a/src/engine/events/SendPortActivity.hpp
+++ b/src/engine/events/SendPortActivity.hpp
@@ -22,6 +22,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -61,6 +62,7 @@ private:
PortImpl* _port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortValue.cpp b/src/engine/events/SendPortValue.cpp
index 3d010520..9ac60a05 100644
--- a/src/engine/events/SendPortValue.cpp
+++ b/src/engine/events/SendPortValue.cpp
@@ -25,6 +25,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
void
@@ -35,6 +36,7 @@ SendPortValue::post_process()
_engine.world()->uris()->ingen_value, _value);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortValue.hpp b/src/engine/events/SendPortValue.hpp
index 8643f41c..3ed1275e 100644
--- a/src/engine/events/SendPortValue.hpp
+++ b/src/engine/events/SendPortValue.hpp
@@ -23,6 +23,7 @@
#include "engine/types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -74,6 +75,7 @@ private:
Raul::Atom _value;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp
index 9ca520dc..8e7ef2bf 100644
--- a/src/engine/events/SetMetadata.cpp
+++ b/src/engine/events/SetMetadata.cpp
@@ -43,10 +43,10 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-typedef Shared::Resource::Properties Properties;
+typedef Resource::Properties Properties;
SetMetadata::SetMetadata(
Engine& engine,
@@ -112,13 +112,13 @@ SetMetadata::pre_process()
return;
}
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
if (is_graph_object && !_object) {
Path path(_subject.str());
bool is_patch = false, is_node = false, is_port = false, is_output = false;
PortType data_type(PortType::UNKNOWN);
- ResourceImpl::type(uris, _properties, is_patch, is_node, is_port, is_output, data_type);
+ Shared::ResourceImpl::type(uris, _properties, is_patch, is_node, is_port, is_output, data_type);
// Create a separate request without a source so EventSource isn't unblocked twice
SharedPtr<Request> sub_request(new Request(NULL, _request->client(), _request->id()));
@@ -193,7 +193,7 @@ SetMetadata::pre_process()
ev->pre_process();
_set_events.push_back(ev);
} else if (key == uris.ingen_controlBinding) {
- if (port->is_a(Shared::PortType::CONTROL)) {
+ if (port->is_a(PortType::CONTROL)) {
if (value == uris.wildcard) {
_engine.control_bindings()->learn(port);
} else if (value.type() == Atom::DICT) {
@@ -322,7 +322,7 @@ SetMetadata::execute(ProcessContext& context)
if (port) {
_engine.control_bindings()->port_binding_changed(context, port);
} else if (node) {
- if (node->plugin_impl()->type() == Shared::Plugin::Internal) {
+ if (node->plugin_impl()->type() == Plugin::Internal) {
node->learn();
}
}
@@ -374,6 +374,7 @@ SetMetadata::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetMetadata.hpp b/src/engine/events/SetMetadata.hpp
index 8b6d322e..ca2d49ec 100644
--- a/src/engine/events/SetMetadata.hpp
+++ b/src/engine/events/SetMetadata.hpp
@@ -24,6 +24,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class PatchImpl;
@@ -64,14 +65,14 @@ class SetMetadata : public QueuedEvent
{
public:
SetMetadata(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- bool create,
- Shared::Resource::Graph context,
- const Raul::URI& subject,
- const Shared::Resource::Properties& properties,
- const Shared::Resource::Properties& remove=Shared::Resource::Properties());
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ bool create,
+ Resource::Graph context,
+ const Raul::URI& subject,
+ const Resource::Properties& properties,
+ const Resource::Properties& remove = Resource::Properties());
~SetMetadata();
@@ -104,18 +105,19 @@ private:
std::vector<SpecialType> _types;
std::vector<SpecialType> _remove_types;
Raul::URI _subject;
- Shared::Resource::Properties _properties;
- Shared::Resource::Properties _remove;
- Shared::ResourceImpl* _object;
+ Resource::Properties _properties;
+ Resource::Properties _remove;
+ Ingen::Shared::ResourceImpl* _object;
PatchImpl* _patch;
CompiledPatch* _compiled_patch;
std::string _error_predicate;
bool _create;
- Shared::Resource::Graph _context;
+ Resource::Graph _context;
SharedPtr<ControlBindings::Bindings> _old_bindings;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetPortValue.cpp b/src/engine/events/SetPortValue.cpp
index 50cf2bec..f68a6cab 100644
--- a/src/engine/events/SetPortValue.cpp
+++ b/src/engine/events/SetPortValue.cpp
@@ -42,10 +42,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
SetPortValue::SetPortValue(Engine& engine,
SharedPtr<Request> request,
bool queued,
@@ -146,7 +145,7 @@ SetPortValue::apply(Context& context)
return;
}
- LV2URIMap& uris = *_engine.world()->uris().get();
+ Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
EventBuffer* const ebuf = dynamic_cast<EventBuffer*>(buf);
if (ebuf && _value.type() == Atom::BLOB) {
@@ -174,7 +173,7 @@ SetPortValue::apply(Context& context)
ObjectBuffer* const obuf = dynamic_cast<ObjectBuffer*>(buf);
if (obuf) {
obuf->atom()->size = obuf->size() - sizeof(LV2_Atom);
- if (LV2Atom::from_atom(uris, _value, obuf->atom())) {
+ if (Ingen::Shared::LV2Atom::from_atom(uris, _value, obuf->atom())) {
debug << "Converted atom " << _value << " :: " << obuf->atom()->type
<< " * " << obuf->atom()->size << " @ " << obuf->atom() << endl;
return;
@@ -218,6 +217,7 @@ SetPortValue::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetPortValue.hpp b/src/engine/events/SetPortValue.hpp
index 80efa842..78ef0cf4 100644
--- a/src/engine/events/SetPortValue.hpp
+++ b/src/engine/events/SetPortValue.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -75,6 +76,7 @@ private:
PortImpl* _port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/UnregisterClient.cpp b/src/engine/events/UnregisterClient.cpp
index 9ca94d57..6f850596 100644
--- a/src/engine/events/UnregisterClient.cpp
+++ b/src/engine/events/UnregisterClient.cpp
@@ -24,6 +24,7 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
UnregisterClient::UnregisterClient(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const URI& uri)
@@ -41,6 +42,7 @@ UnregisterClient::post_process()
_request->respond_error("Unable to unregister client");
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/UnregisterClient.hpp b/src/engine/events/UnregisterClient.hpp
index 84b1fbc2..427fc897 100644
--- a/src/engine/events/UnregisterClient.hpp
+++ b/src/engine/events/UnregisterClient.hpp
@@ -22,6 +22,7 @@
#include "raul/URI.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Unregisters an OSC client so it no longer receives notifications.
@@ -42,6 +43,7 @@ private:
Raul::URI _uri;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/ingen_engine.cpp b/src/engine/ingen_engine.cpp
index 2bcaa64b..7022f567 100644
--- a/src/engine/ingen_engine.cpp
+++ b/src/engine/ingen_engine.cpp
@@ -26,11 +26,12 @@ using namespace Ingen;
struct IngenEngineModule : public Ingen::Shared::Module {
virtual void load(Ingen::Shared::World* world) {
- set_denormal_flags();
- SharedPtr<Engine> engine(new Ingen::Engine(world));
+ Engine::set_denormal_flags();
+ SharedPtr<Engine::Engine> engine(new Engine::Engine(world));
world->set_local_engine(engine);
- SharedPtr<QueuedEngineInterface> interface(
- new Ingen::QueuedEngineInterface(*engine.get(), event_queue_size));
+ SharedPtr<Engine::QueuedEngineInterface> interface(
+ new Engine::QueuedEngineInterface(*engine.get(),
+ Engine::event_queue_size));
world->set_engine(interface);
engine->add_event_source(interface);
assert(world->local_engine() == engine);
diff --git a/src/engine/ingen_jack.cpp b/src/engine/ingen_jack.cpp
index e8645cb9..e46dd8a6 100644
--- a/src/engine/ingen_jack.cpp
+++ b/src/engine/ingen_jack.cpp
@@ -25,11 +25,12 @@ using namespace Ingen;
struct IngenJackModule : public Ingen::Shared::Module {
void load(Ingen::Shared::World* world) {
- Ingen::JackDriver* driver = new Ingen::JackDriver(
- *(Engine*)world->local_engine().get());
+ Engine::JackDriver* driver = new Engine::JackDriver(
+ *(Engine::Engine*)world->local_engine().get());
driver->attach(world->conf()->option("jack-server").get_string(),
world->conf()->option("jack-client").get_string(), NULL);
- ((Engine*)world->local_engine().get())->set_driver(SharedPtr<Driver>(driver));
+ ((Engine::Engine*)world->local_engine().get())->set_driver(
+ SharedPtr<Engine::Driver>(driver));
}
};
diff --git a/src/engine/ingen_lv2.cpp b/src/engine/ingen_lv2.cpp
index c48e65fa..44ebc52b 100644
--- a/src/engine/ingen_lv2.cpp
+++ b/src/engine/ingen_lv2.cpp
@@ -63,19 +63,19 @@ public:
typedef std::vector< SharedPtr<const LV2Patch> > Patches;
- Patches patches;
- Ingen::Configuration conf;
- int argc;
- char** argv;
+ Patches patches;
+ Ingen::Shared::Configuration conf;
+ int argc;
+ char** argv;
};
/** Library state (constructed/destructed on library load/unload) */
Lib lib;
namespace Ingen {
-namespace LV2 {
+namespace Engine {
-struct LV2Driver;
+class LV2Driver;
class LV2Port : public DriverPort
{
@@ -123,7 +123,7 @@ private:
void* _buffer;
};
-struct LV2Driver : public Driver {
+class LV2Driver : public Ingen::Engine::Driver {
private:
typedef std::vector<LV2Port*> Ports;
@@ -164,7 +164,8 @@ public:
_ports.push_back((LV2Port*)port);
}
- virtual Raul::Deletable* remove_port(const Raul::Path& path, Ingen::DriverPort** port=NULL) {
+ virtual Raul::Deletable* remove_port(const Raul::Path& path,
+ DriverPort** port=NULL) {
// Note this doesn't have to be realtime safe since there's no dynamic LV2 ports
ThreadManager::assert_thread(THREAD_PROCESS);
@@ -179,7 +180,7 @@ public:
return NULL;
}
- virtual bool supports(Shared::PortType port_type, Shared::EventType event_type) {
+ virtual bool supports(PortType port_type, EventType event_type) {
return true;
}
@@ -215,11 +216,14 @@ private:
Ports _ports;
};
-} // namespace LV2
+} // namespace Engine
} // namespace Ingen
extern "C" {
+using namespace Ingen;
+using namespace Ingen::Engine;
+
/** LV2 plugin library entry point */
LV2_SYMBOL_EXPORT
const LV2_Descriptor*
@@ -238,9 +242,6 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
const char* bundle_path,
const LV2_Feature*const* features)
{
- using namespace Ingen;
- using namespace LV2;
-
Shared::set_bundle_path(bundle_path);
const LV2Patch* patch = NULL;
@@ -257,31 +258,32 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
}
IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin));
- plugin->world = new World(&lib.conf, lib.argc, lib.argv);
+ plugin->world = new Ingen::Shared::World(&lib.conf, lib.argc, lib.argv);
if (!plugin->world->load_module("serialisation")) {
delete plugin->world;
return NULL;
}
- SharedPtr<Engine> engine(new Engine(plugin->world));
+ SharedPtr<Engine::Engine> engine(new Engine::Engine(plugin->world));
plugin->world->set_local_engine(engine);
- SharedPtr<QueuedEngineInterface> interface(
- new Ingen::QueuedEngineInterface(
+ SharedPtr<Engine::QueuedEngineInterface> interface(
+ new Engine::QueuedEngineInterface(
*engine.get(),
- event_queue_size));
+ Engine::event_queue_size));
plugin->world->set_engine(interface);
engine->add_event_source(interface);
- Raul::Thread::get().set_context(THREAD_PRE_PROCESS);
- ThreadManager::single_threaded = true;
+ Raul::Thread::get().set_context(Engine::THREAD_PRE_PROCESS);
+ Engine::ThreadManager::single_threaded = true;
// FIXME: fixed (or at least maximum) buffer size
- engine->set_driver(SharedPtr<Driver>(new LV2Driver(*engine.get(), rate, 4096)));
-
+ LV2Driver* driver = new LV2Driver(*engine.get(), rate, 4096);
+ engine->set_driver(SharedPtr<Ingen::Engine::Driver>(driver));
+
engine->activate();
- ThreadManager::single_threaded = true;
+ Engine::ThreadManager::single_threaded = true;
ProcessContext context(*engine.get());
context.locate(0, UINT_MAX, 0);
@@ -310,9 +312,11 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
static void
ingen_connect_port(LV2_Handle instance, uint32_t port, void* data)
{
- IngenPlugin* me = (IngenPlugin*)instance;
- Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get();
- Ingen::LV2::LV2Driver* driver = (Ingen::LV2::LV2Driver*)engine->driver();
+ using namespace Ingen::Engine;
+
+ IngenPlugin* me = (IngenPlugin*)instance;
+ Engine::Engine* engine = (Engine::Engine*)me->world->local_engine().get();
+ LV2Driver* driver = (LV2Driver*)engine->driver();
if (port < driver->ports().size()) {
driver->ports().at(port)->set_buffer(data);
assert(driver->ports().at(port)->patch_port()->index() == port);
@@ -331,11 +335,11 @@ ingen_activate(LV2_Handle instance)
static void
ingen_run(LV2_Handle instance, uint32_t sample_count)
{
- IngenPlugin* me = (IngenPlugin*)instance;
- Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get();
+ IngenPlugin* me = (IngenPlugin*)instance;
+ Engine::Engine* engine = (Engine::Engine*)me->world->local_engine().get();
// FIXME: don't do this every call
- Raul::Thread::get().set_context(Ingen::THREAD_PROCESS);
- ((Ingen::LV2::LV2Driver*)engine->driver())->run(sample_count);
+ Raul::Thread::get().set_context(Ingen::Engine::THREAD_PROCESS);
+ ((LV2Driver*)engine->driver())->run(sample_count);
}
static void
@@ -349,7 +353,7 @@ static void
ingen_cleanup(LV2_Handle instance)
{
IngenPlugin* me = (IngenPlugin*)instance;
- me->world->set_local_engine(SharedPtr<Ingen::Engine>());
+ me->world->set_local_engine(SharedPtr<Ingen::Engine::Engine>());
me->world->set_engine(SharedPtr<Ingen::EngineInterface>());
delete me->world;
free(instance);
@@ -384,7 +388,6 @@ Lib::Lib()
Glib::thread_init();
using namespace Ingen;
- using namespace LV2;
Ingen::Shared::set_bundle_path_from_code((void*)&lv2_descriptor);
diff --git a/src/engine/ingen_osc.cpp b/src/engine/ingen_osc.cpp
index 0a2d6768..09428508 100644
--- a/src/engine/ingen_osc.cpp
+++ b/src/engine/ingen_osc.cpp
@@ -26,12 +26,13 @@ using namespace Ingen;
struct IngenOSCModule : public Ingen::Shared::Module {
void load(Ingen::Shared::World* world) {
- SharedPtr<OSCEngineReceiver> interface(
- new Ingen::OSCEngineReceiver(
- *(Engine*)world->local_engine().get(),
- event_queue_size,
- world->conf()->option("engine-port").get_int32()));
- ((Engine*)world->local_engine().get())->add_event_source(interface);
+ Engine::Engine* engine = (Engine::Engine*)world->local_engine().get();
+ SharedPtr<Engine::OSCEngineReceiver> interface(
+ new Engine::OSCEngineReceiver(
+ *engine,
+ Engine::event_queue_size,
+ world->conf()->option("engine-port").get_int32()));
+ engine->add_event_source(interface);
}
};
diff --git a/src/engine/internals/Controller.cpp b/src/engine/internals/Controller.cpp
index 7b27d664..15156f08 100644
--- a/src/engine/internals/Controller.cpp
+++ b/src/engine/internals/Controller.cpp
@@ -32,10 +32,9 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* ControllerNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Controller", "controller");
}
@@ -49,7 +48,7 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
: NodeImpl(plugin, path, false, parent, srate)
, _learning(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(6);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -143,5 +142,6 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Controller.hpp b/src/engine/internals/Controller.hpp
index 1960b5e3..54b1d3ac 100644
--- a/src/engine/internals/Controller.hpp
+++ b/src/engine/internals/Controller.hpp
@@ -22,6 +22,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -66,6 +67,7 @@ private:
OutputPort* _audio_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Delay.cpp b/src/engine/internals/Delay.cpp
index fb599acf..bded108a 100644
--- a/src/engine/internals/Delay.cpp
+++ b/src/engine/internals/Delay.cpp
@@ -43,10 +43,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
static const float MAX_DELAY_SECONDS = 8.0f;
InternalPlugin* DelayNode::internal_plugin(Shared::LV2URIMap& uris) {
@@ -66,7 +65,7 @@ DelayNode::DelayNode(
, _buffer_mask(0)
, _write_phase(0)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(3);
const float default_delay = 1.0f;
@@ -204,5 +203,6 @@ DelayNode::process(ProcessContext& context)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Delay.hpp b/src/engine/internals/Delay.hpp
index 0f1ee66e..bc6f2682 100644
--- a/src/engine/internals/Delay.hpp
+++ b/src/engine/internals/Delay.hpp
@@ -24,6 +24,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -70,6 +71,7 @@ private:
float _delay_samples;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Note.cpp b/src/engine/internals/Note.cpp
index 5ec294a1..8545857e 100644
--- a/src/engine/internals/Note.cpp
+++ b/src/engine/internals/Note.cpp
@@ -39,10 +39,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* NoteNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Note", "note");
}
@@ -59,7 +58,7 @@ NoteNode::NoteNode(
, _prepared_voices(NULL)
, _sustain(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -412,5 +411,6 @@ NoteNode::sustain_off(ProcessContext& context, FrameTime time)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Note.hpp b/src/engine/internals/Note.hpp
index 7677b68d..7a47dc76 100644
--- a/src/engine/internals/Note.hpp
+++ b/src/engine/internals/Note.hpp
@@ -23,6 +23,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -93,6 +94,7 @@ private:
OutputPort* _trig_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Trigger.cpp b/src/engine/internals/Trigger.cpp
index 2820afe3..55474618 100644
--- a/src/engine/internals/Trigger.cpp
+++ b/src/engine/internals/Trigger.cpp
@@ -35,10 +35,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* TriggerNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Trigger", "trigger");
}
@@ -53,7 +52,7 @@ TriggerNode::TriggerNode(
: NodeImpl(plugin, path, false, parent, srate)
, _learning(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -165,4 +164,5 @@ TriggerNode::note_off(ProcessContext& context, uint8_t note_num, FrameTime time)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Trigger.hpp b/src/engine/internals/Trigger.hpp
index 53e83081..da796f5e 100644
--- a/src/engine/internals/Trigger.hpp
+++ b/src/engine/internals/Trigger.hpp
@@ -22,6 +22,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -69,6 +70,7 @@ private:
OutputPort* _vel_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/mix.hpp b/src/engine/mix.hpp
index 5ae8cd59..3797396b 100644
--- a/src/engine/mix.hpp
+++ b/src/engine/mix.hpp
@@ -26,11 +26,12 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
inline void
mix(Context& context, Buffer* dst, const IntrusivePtr<Buffer>* srcs, uint32_t num_srcs)
{
- using Shared::PortType;
+ using Ingen::PortType;
switch (dst->type().symbol()) {
case PortType::AUDIO:
case PortType::CONTROL:
@@ -84,6 +85,7 @@ mix(Context& context, Buffer* dst, const IntrusivePtr<Buffer>* srcs, uint32_t nu
}
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_MIX_HPP
diff --git a/src/engine/tuning.hpp b/src/engine/tuning.hpp
index 8415dc48..8bd8e204 100644
--- a/src/engine/tuning.hpp
+++ b/src/engine/tuning.hpp
@@ -22,6 +22,7 @@
#include <time.h>
namespace Ingen {
+namespace Engine {
// FIXME: put this in a Config class
@@ -33,6 +34,7 @@ static const size_t message_context_queue_size = 1024;
static const size_t event_bytes_per_frame = 4;
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_TUNING_HPP
diff --git a/src/engine/util.hpp b/src/engine/util.hpp
index 7cd06bd5..fb9ba161 100644
--- a/src/engine/util.hpp
+++ b/src/engine/util.hpp
@@ -40,6 +40,7 @@
#endif
namespace Ingen {
+namespace Engine {
/** Set flags to disable denormal processing.
*/
@@ -83,6 +84,7 @@ ingen_jack_port_name(const Raul::Path& path)
return path.chop_start("/");
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_UTIL_HPP
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 5462116a..0ed8b10a 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -35,6 +35,7 @@
#include "client/ObjectModel.hpp"
#include "client/PatchModel.hpp"
#include "client/ClientStore.hpp"
+#include "client/SigClientInterface.hpp"
#include "NodeModule.hpp"
#include "ControlPanel.hpp"
#include "SubpatchModule.hpp"
@@ -160,9 +161,9 @@ void
App::attach(SharedPtr<SigClientInterface> client,
SharedPtr<Raul::Deletable> handle)
{
- assert( ! _client);
- assert( ! _store);
- assert( ! _loader);
+ assert(!_client);
+ assert(!_store);
+ assert(!_loader);
_world->engine()->register_client(client.get());
@@ -372,7 +373,7 @@ App::icon_destroyed(void* data)
}
bool
-App::can_control(const Shared::Port* port) const
+App::can_control(const Ingen::Port* port) const
{
return port->is_a(PortType::CONTROL)
|| (port->is_a(PortType::VALUE)
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 5f68f12f..5a5fa0c2 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -30,12 +30,11 @@
#include "shared/World.hpp"
namespace Ingen {
- class Engine;
+ class ClientInterface;
+ class EngineInterface;
+ class Port;
namespace Shared {
- class EngineInterface;
- class ClientInterface;
class World;
- class Port;
}
namespace Client {
class ClientStore;
@@ -63,11 +62,7 @@ class ThreadedLoader;
class WindowFactory;
class Port;
-/** Singleton master class most everything is contained within.
- *
- * This is a horrible god-object, but it's shrinking in size as things are
- * moved out. Hopefully it will go away entirely some day..
- *
+/** Ingen Gtk Application.
* \ingroup GUI
*/
class App
@@ -90,7 +85,7 @@ public:
void port_activity(Port* port);
void activity_port_destroyed(Port* port);
- bool can_control(const Shared::Port* port) const;
+ bool can_control(const Ingen::Port* port) const;
bool signal() const { return _enable_signal; }
bool disable_signals() { bool old = _enable_signal; _enable_signal = false; return old; }
@@ -104,7 +99,7 @@ public:
Glib::RefPtr<Gdk::Pixbuf> icon_from_path(const std::string& path, int size);
- SharedPtr<Shared::EngineInterface> engine() const { return _world->engine(); }
+ SharedPtr<Ingen::EngineInterface> engine() const { return _world->engine(); }
SharedPtr<Client::SigClientInterface> client() const { return _client; }
SharedPtr<Client::ClientStore> store() const { return _store; }
SharedPtr<ThreadedLoader> loader() const { return _loader; }
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index cc675dab..1fcbfe88 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -84,13 +84,13 @@ Configuration::get_port_color(const PortModel* p)
{
assert(p != NULL);
const Shared::LV2URIMap& uris = App::instance().uris();
- if (p->is_a(Shared::PortType::AUDIO)) {
+ if (p->is_a(PortType::AUDIO)) {
return _audio_port_color;
} else if (p->supports(uris.atom_String)) {
return _string_port_color;
} else if (App::instance().can_control(p)) {
return _control_port_color;
- } else if (p->is_a(Shared::PortType::EVENTS) || p->is_a(Shared::PortType::MESSAGE)) {
+ } else if (p->is_a(PortType::EVENTS) || p->is_a(PortType::MESSAGE)) {
return _event_port_color;
}
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 19e5594b..684b8f30 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -84,7 +84,7 @@ ConnectWindow::start(Ingen::Shared::World* world)
}
void
-ConnectWindow::set_connected_to(SharedPtr<Shared::EngineInterface> engine)
+ConnectWindow::set_connected_to(SharedPtr<EngineInterface> engine)
{
App::instance().world()->set_engine(engine);
@@ -246,7 +246,7 @@ ConnectWindow::connect(bool existing)
SharedPtr<SigClientInterface> client(new SigClientInterface());
- if (!((Engine*)world->local_engine().get())->driver())
+ if (!((Engine::Engine*)world->local_engine().get())->driver())
world->load_module("jack");
world->local_engine()->activate();
@@ -266,7 +266,7 @@ ConnectWindow::disconnect()
_attached = false;
App::instance().detach();
- set_connected_to(SharedPtr<Ingen::Shared::EngineInterface>());
+ set_connected_to(SharedPtr<Ingen::EngineInterface>());
if (!_widgets_loaded)
return;
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 9823cfc6..b5434d29 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -27,12 +27,10 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
+
#include "raul/SharedPtr.hpp"
-#include "client/ThreadedSigClientInterface.hpp"
-#include "Window.hpp"
-using Ingen::Client::SigClientInterface;
-namespace Ingen { class Engine; class QueuedEngineInterface; }
+#include "Window.hpp"
namespace Ingen {
namespace GUI {
@@ -51,7 +49,7 @@ class ConnectWindow : public Dialog
public:
ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
- void set_connected_to(SharedPtr<Shared::EngineInterface> engine);
+ void set_connected_to(SharedPtr<EngineInterface> engine);
void start(Ingen::Shared::World* world);
void on_response(int32_t id) { _attached = true; }
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index b64c460c..083c1457 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -91,7 +91,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
= GladeFactory::new_glade_reference("toggle_control");
xml->get_widget_derived("toggle_control", tc);
control = tc;
- } else if (pm->is_a(Shared::PortType::CONTROL)
+ } else if (pm->is_a(PortType::CONTROL)
|| pm->supports(App::instance().uris().atom_Float32)) {
SliderControl* sc;
Glib::RefPtr<Gnome::Glade::Xml> xml
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index d4ba8bd4..984e84b8 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -372,10 +372,10 @@ NodeModule::store_location()
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- Shared::Resource::Properties remove;
+ Resource::Properties remove;
remove.insert(make_pair(uris.ingenui_canvas_x, uris.wildcard));
remove.insert(make_pair(uris.ingenui_canvas_y, uris.wildcard));
- Shared::Resource::Properties add;
+ Resource::Properties add;
add.insert(make_pair(uris.ingenui_canvas_x, Atom(x)));
add.insert(make_pair(uris.ingenui_canvas_y, Atom(y)));
App::instance().engine()->delta(_node->path(), remove, add);
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index cecec962..10bb60e6 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -93,7 +93,7 @@ PatchPortModule::store_location()
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- Shared::Resource::Properties props;
+ Resource::Properties props;
props.insert(make_pair(uris.ingenui_canvas_x, Atom(x)));
props.insert(make_pair(uris.ingenui_canvas_y, Atom(y)));
App::instance().engine()->put(_model->path(), props, Resource::INTERNAL);
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index 62310a1f..1f3be2fb 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -147,7 +147,7 @@ void
PortPropertiesWindow::ok()
{
const Shared::LV2URIMap& uris = App::instance().uris();
- Shared::Resource::Properties props;
+ Resource::Properties props;
props.insert(make_pair(uris.lv2_minimum, float(_min_spinner->get_value())));
props.insert(make_pair(uris.lv2_maximum, float(_max_spinner->get_value())));
App::instance().engine()->put(_port_model->path(), props);
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 37a5994b..1a1e5fab 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -276,7 +276,7 @@ void
PropertiesWindow::apply_clicked()
{
LOG(debug) << "apply {" << endl;
- Shared::Resource::Properties properties;
+ Resource::Properties properties;
for (Records::const_iterator r = _records.begin(); r != _records.end(); ++r) {
const Raul::URI& uri = r->first;
const Record& record = r->second;
diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp
index ceb50397..1f610810 100644
--- a/src/ingen/main.cpp
+++ b/src/ingen/main.cpp
@@ -102,7 +102,7 @@ main(int argc, char** argv)
// Set bundle path from executable location so resources can be found
Shared::set_bundle_path_from_code((void*)&main);
- SharedPtr<Shared::EngineInterface> engine_interface;
+ SharedPtr<EngineInterface> engine_interface;
Glib::thread_init();
#if HAVE_SOUP
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index 5b4df2f1..f66cd38f 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -136,7 +136,7 @@ Parser::find_patches(Ingen::Shared::World* world,
*/
bool
Parser::parse_file(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
Glib::ustring file_uri,
boost::optional<Raul::Path> parent,
boost::optional<Raul::Symbol> symbol,
@@ -190,7 +190,7 @@ Parser::parse_file(Ingen::Shared::World* world,
bool
Parser::parse_string(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
const Glib::ustring& str,
const Glib::ustring& base_uri,
boost::optional<Raul::Path> parent,
@@ -216,7 +216,7 @@ Parser::parse_string(Ingen::Shared::World* world,
boost::optional<Path>
Parser::parse(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
Sord::Model& model,
Glib::ustring document_uri,
boost::optional<Raul::Path> data_path,
@@ -350,7 +350,7 @@ get_port(Ingen::Shared::World* world,
boost::optional<Path>
Parser::parse_patch(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
Sord::Model& model,
const Sord::Node& subject_node,
boost::optional<Raul::Path> parent,
@@ -468,7 +468,7 @@ Parser::parse_patch(Ingen::Shared::World* world,
boost::optional<Path>
Parser::parse_node(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
Sord::Model& model,
const Sord::Node& subject,
const Raul::Path& path,
@@ -524,11 +524,11 @@ Parser::parse_node(Ingen::Shared::World* world,
}
bool
-Parser::parse_connections(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Sord::Model& model,
- const Sord::Node& subject,
- const Raul::Path& parent)
+Parser::parse_connections(Ingen::Shared::World* world,
+ Ingen::CommonInterface* target,
+ Sord::Model& model,
+ const Sord::Node& subject,
+ const Raul::Path& parent)
{
Sord::URI ingen_connection(*world->rdf_world(), NS_INGEN "connection");
Sord::URI ingen_source(*world->rdf_world(), NS_INGEN "source");
@@ -574,7 +574,7 @@ Parser::parse_connections(Ingen::Shared::World* world,
bool
Parser::parse_properties(Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
+ Ingen::CommonInterface* target,
Sord::Model& model,
const Sord::Node& subject,
const Raul::URI& uri,
diff --git a/src/serialisation/Parser.hpp b/src/serialisation/Parser.hpp
index 1d7d36dd..b5e2db63 100644
--- a/src/serialisation/Parser.hpp
+++ b/src/serialisation/Parser.hpp
@@ -30,38 +30,39 @@
#include "ingen/GraphObject.hpp"
namespace Sord { class World; class Model; class Node; }
-namespace Ingen { namespace Shared { class CommonInterface; } }
namespace Ingen {
+class CommonInterface;
+
namespace Shared { class World; }
namespace Serialisation {
class Parser {
public:
- Parser(Ingen::Shared::World& world);
+ Parser(Shared::World& world);
virtual ~Parser() {}
- typedef Shared::GraphObject::Properties Properties;
+ typedef GraphObject::Properties Properties;
virtual bool parse_file(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
+ Shared::World* world,
+ CommonInterface* target,
Glib::ustring document_uri,
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<Properties> data=boost::optional<Properties>());
+ boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data = boost::optional<Properties>());
virtual bool parse_string(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
+ Shared::World* world,
+ CommonInterface* target,
const Glib::ustring& str,
const Glib::ustring& base_uri,
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<Properties> data=boost::optional<Properties>());
+ boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data = boost::optional<Properties>());
struct PatchRecord {
PatchRecord(const Raul::URI& u, const Glib::ustring& f)
@@ -73,51 +74,51 @@ public:
typedef std::list<PatchRecord> PatchRecords;
- virtual PatchRecords find_patches(Ingen::Shared::World* world,
+ virtual PatchRecords find_patches(Shared::World* world,
const Glib::ustring& manifest_uri);
private:
boost::optional<Raul::Path> parse(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
+ Shared::World* world,
+ CommonInterface* target,
Sord::Model& model,
Glib::ustring document_uri,
- boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<Properties> data=boost::optional<Properties>());
+ boost::optional<Raul::Path> data_path = boost::optional<Raul::Path>(),
+ boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data = boost::optional<Properties>());
boost::optional<Raul::Path> parse_patch(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Sord::Model& model,
- const Sord::Node& subject,
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<Properties> data=boost::optional<Properties>());
+ Shared::World* world,
+ CommonInterface* target,
+ Sord::Model& model,
+ const Sord::Node& subject,
+ boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data = boost::optional<Properties>());
boost::optional<Raul::Path> parse_node(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Sord::Model& model,
- const Sord::Node& subject,
- const Raul::Path& path,
- boost::optional<Properties> data=boost::optional<Properties>());
+ Shared::World* world,
+ CommonInterface* target,
+ Sord::Model& model,
+ const Sord::Node& subject,
+ const Raul::Path& path,
+ boost::optional<Properties> data = boost::optional<Properties>());
bool parse_properties(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Sord::Model& model,
- const Sord::Node& subject,
- const Raul::URI& uri,
- boost::optional<Properties> data = boost::optional<Properties>());
+ Shared::World* world,
+ CommonInterface* target,
+ Sord::Model& model,
+ const Sord::Node& subject,
+ const Raul::URI& uri,
+ boost::optional<Properties> data = boost::optional<Properties>());
bool parse_connections(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Sord::Model& model,
- const Sord::Node& subject,
- const Raul::Path& patch);
+ Shared::World* world,
+ CommonInterface* target,
+ Sord::Model& model,
+ const Sord::Node& subject,
+ const Raul::Path& patch);
};
} // namespace Serialisation
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index 8b42de34..37d80e0d 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -76,8 +76,8 @@ Serialiser::Serialiser(Shared::World& world, SharedPtr<Shared::Store> store)
}
void
-Serialiser::to_file(SharedPtr<Shared::GraphObject> object,
- const std::string& filename)
+Serialiser::to_file(SharedPtr<GraphObject> object,
+ const std::string& filename)
{
_root_path = object->path();
start_to_filename(filename);
@@ -95,9 +95,9 @@ uri_to_symbol(const std::string& uri)
}
void
-Serialiser::write_manifest(const std::string& bundle_path,
- SharedPtr<Shared::Patch> patch,
- const std::string& patch_symbol)
+Serialiser::write_manifest(const std::string& bundle_path,
+ SharedPtr<Patch> patch,
+ const std::string& patch_symbol)
{
const string manifest_path(Glib::build_filename(bundle_path, "manifest.ttl"));
const string binary_path(Glib::Module::build_path("", "ingen_lv2"));
@@ -146,8 +146,8 @@ normal_bundle_uri(const std::string& uri)
}
void
-Serialiser::write_bundle(SharedPtr<Shared::Patch> patch,
- const std::string& uri)
+Serialiser::write_bundle(SharedPtr<Patch> patch,
+ const std::string& uri)
{
Glib::ustring path = "";
try {
@@ -158,7 +158,7 @@ Serialiser::write_bundle(SharedPtr<Shared::Patch> patch,
}
if (Glib::file_test(path, Glib::FILE_TEST_EXISTS)
- && !Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
+ && !Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
path = Glib::path_get_dirname(path);
}
@@ -277,21 +277,21 @@ Serialiser::serialise(SharedPtr<GraphObject> object) throw (std::logic_error)
if (!_model)
throw std::logic_error("serialise called without serialization in progress");
- SharedPtr<Shared::Patch> patch = PtrCast<Shared::Patch>(object);
+ SharedPtr<Patch> patch = PtrCast<Patch>(object);
if (patch) {
const Sord::URI patch_id(_model->world(), "");
serialise_patch(patch, patch_id);
return;
}
- SharedPtr<Shared::Node> node = PtrCast<Shared::Node>(object);
+ SharedPtr<Node> node = PtrCast<Node>(object);
if (node) {
const Sord::URI plugin_id(_model->world(), node->plugin()->uri().str());
serialise_node(node, plugin_id, path_rdf_node(node->path()));
return;
}
- SharedPtr<Shared::Port> port = PtrCast<Shared::Port>(object);
+ SharedPtr<Port> port = PtrCast<Port>(object);
if (port) {
serialise_port(port.get(), Resource::DEFAULT, path_rdf_node(port->path()));
return;
@@ -302,7 +302,7 @@ Serialiser::serialise(SharedPtr<GraphObject> object) throw (std::logic_error)
}
void
-Serialiser::serialise_patch(SharedPtr<Shared::Patch> patch, const Sord::Node& patch_id)
+Serialiser::serialise_patch(SharedPtr<Patch> patch, const Sord::Node& patch_id)
{
assert(_model);
Sord::World& world = _model->world();
@@ -348,8 +348,8 @@ Serialiser::serialise_patch(SharedPtr<Shared::Patch> patch, const Sord::Node& pa
if (n->first.parent() != patch->path())
continue;
- SharedPtr<Shared::Patch> subpatch = PtrCast<Shared::Patch>(n->second);
- SharedPtr<Shared::Node> node = PtrCast<Shared::Node>(n->second);
+ SharedPtr<Patch> subpatch = PtrCast<Patch>(n->second);
+ SharedPtr<Node> node = PtrCast<Node>(n->second);
if (subpatch) {
SerdURI base_uri;
serd_uri_parse((const uint8_t*)_base_uri.c_str(), &base_uri);
@@ -406,16 +406,16 @@ Serialiser::serialise_patch(SharedPtr<Shared::Patch> patch, const Sord::Node& pa
serialise_port(p, Resource::INTERNAL, port_id);
}
- for (Shared::Patch::Connections::const_iterator c = patch->connections().begin();
+ for (Patch::Connections::const_iterator c = patch->connections().begin();
c != patch->connections().end(); ++c) {
serialise_connection(patch_id, c->second);
}
}
void
-Serialiser::serialise_node(SharedPtr<Shared::Node> node,
- const Sord::Node& class_id,
- const Sord::Node& node_id)
+Serialiser::serialise_node(SharedPtr<Node> node,
+ const Sord::Node& class_id,
+ const Sord::Node& node_id)
{
_model->add_statement(node_id,
Sord::Curie(_model->world(), "rdf:type"),
@@ -440,9 +440,9 @@ Serialiser::serialise_node(SharedPtr<Shared::Node> node,
}
void
-Serialiser::serialise_port(const Port* port,
- Shared::Resource::Graph context,
- const Sord::Node& port_id)
+Serialiser::serialise_port(const Port* port,
+ Resource::Graph context,
+ const Sord::Node& port_id)
{
Sord::World& world = _model->world();
@@ -522,9 +522,9 @@ skip_property(const Sord::Node& predicate)
}
void
-Serialiser::serialise_properties(const Shared::GraphObject* o,
- Shared::Resource::Graph context,
- Sord::Node id)
+Serialiser::serialise_properties(const GraphObject* o,
+ Ingen::Resource::Graph context,
+ Sord::Node id)
{
const GraphObject::Properties props = o->properties(context);
diff --git a/src/serialisation/Serialiser.hpp b/src/serialisation/Serialiser.hpp
index 90c49c55..fc26c387 100644
--- a/src/serialisation/Serialiser.hpp
+++ b/src/serialisation/Serialiser.hpp
@@ -34,15 +34,14 @@
namespace Ingen {
-namespace Shared {
class Plugin;
class GraphObject;
class Patch;
class Node;
class Port;
class Connection;
-class World;
-}
+
+namespace Shared { class World; }
namespace Serialisation {
@@ -55,22 +54,25 @@ class Serialiser
public:
Serialiser(Shared::World& world, SharedPtr<Shared::Store> store);
- typedef Shared::GraphObject::Properties Properties;
+ typedef GraphObject::Properties Properties;
+
+ void to_file(SharedPtr<GraphObject> object,
+ const std::string& filename);
+
+ void write_bundle(SharedPtr<Patch> patch,
+ const std::string& uri);
- void to_file(SharedPtr<Shared::GraphObject> object,
- const std::string& filename);
+ std::string to_string(SharedPtr<GraphObject> object,
+ const std::string& base_uri,
+ const Properties& extra_rdf);
- void write_bundle(SharedPtr<Shared::Patch> patch,
- const std::string& uri);
+ void start_to_string(const Raul::Path& root,
+ const std::string& base_uri);
- std::string to_string(SharedPtr<Shared::GraphObject> object,
- const std::string& base_uri,
- const Properties& extra_rdf);
+ void serialise(SharedPtr<GraphObject> object) throw (std::logic_error);
- void start_to_string(const Raul::Path& root, const std::string& base_uri);
- void serialise(SharedPtr<Shared::GraphObject> object) throw (std::logic_error);
- void serialise_connection(const Sord::Node& parent,
- SharedPtr<Shared::Connection> c) throw (std::logic_error);
+ void serialise_connection(const Sord::Node& parent,
+ SharedPtr<Connection> c) throw (std::logic_error);
std::string finish();
@@ -79,26 +81,26 @@ private:
void start_to_filename(const std::string& filename);
- void serialise_patch(SharedPtr<Shared::Patch> p,
- const Sord::Node& id);
+ void serialise_patch(SharedPtr<Patch> p,
+ const Sord::Node& id);
- void serialise_node(SharedPtr<Shared::Node> n,
- const Sord::Node& class_id,
- const Sord::Node& id);
+ void serialise_node(SharedPtr<Node> n,
+ const Sord::Node& class_id,
+ const Sord::Node& id);
- void serialise_port(const Shared::Port* p,
- Shared::Resource::Graph context,
- const Sord::Node& id);
+ void serialise_port(const Port* p,
+ Resource::Graph context,
+ const Sord::Node& id);
- void serialise_properties(const Shared::GraphObject* o,
- Shared::Resource::Graph context,
- Sord::Node id);
+ void serialise_properties(const GraphObject* o,
+ Resource::Graph context,
+ Sord::Node id);
Sord::Node path_rdf_node(const Raul::Path& path);
- void write_manifest(const std::string& bundle_path,
- SharedPtr<Shared::Patch> patch,
- const std::string& patch_symbol);
+ void write_manifest(const std::string& bundle_path,
+ SharedPtr<Patch> patch,
+ const std::string& patch_symbol);
Raul::Path _root_path;
SharedPtr<Shared::Store> _store;
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<Shared::GraphObject> o) const
+Store::children_begin(SharedPtr<GraphObject> o) const
{
const_iterator parent = find(o->path());
assert(parent != end());
@@ -57,15 +57,15 @@ Store::children_begin(SharedPtr<Shared::GraphObject> o) const
}
Store::const_iterator
-Store::children_end(SharedPtr<Shared::GraphObject> o) const
+Store::children_end(SharedPtr<GraphObject> o) const
{
const_iterator parent = find(o->path());
assert(parent != end());
return find_descendants_end(parent);
}
-SharedPtr<Shared::GraphObject>
-Store::find_child(SharedPtr<Shared::GraphObject> parent, const string& child_name) const
+SharedPtr<GraphObject>
+Store::find_child(SharedPtr<GraphObject> parent, const string& child_name) const
{
const_iterator pi = find(parent->path());
assert(pi != end());
@@ -74,7 +74,7 @@ Store::find_child(SharedPtr<Shared::GraphObject> parent, const string& child_nam
if (child != end())
return child->second;
else
- return SharedPtr<Shared::GraphObject>();
+ return SharedPtr<GraphObject>();
}
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<Shared::GraphObject> > {
+class Store : public Raul::PathTable< SharedPtr<GraphObject> > {
public:
virtual ~Store() {}
- virtual void add(Shared::GraphObject* o);
+ virtual void add(GraphObject* o);
- typedef Raul::Table< Raul::Path, SharedPtr<Shared::GraphObject> > Objects;
+ typedef Raul::Table< Raul::Path, SharedPtr<GraphObject> > Objects;
- const_iterator children_begin(SharedPtr<Shared::GraphObject> o) const;
- const_iterator children_end(SharedPtr<Shared::GraphObject> o) const;
+ const_iterator children_begin(SharedPtr<GraphObject> o) const;
+ const_iterator children_end(SharedPtr<GraphObject> o) const;
- SharedPtr<Shared::GraphObject> find_child(SharedPtr<Shared::GraphObject> parent,
- const std::string& child_name) const;
+ SharedPtr<GraphObject> find_child(SharedPtr<GraphObject> 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<Ingen::Shared::EngineInterface>
+SharedPtr<EngineInterface>
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<Ingen::Shared::EngineInterface>();
+ return SharedPtr<EngineInterface>();
}
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<Shared::EngineInterface> (*InterfaceFactory)(
+ typedef SharedPtr<EngineInterface> (*InterfaceFactory)(
World* world,
const std::string& engine_url);
virtual void add_interface_factory(const std::string& scheme,
InterfaceFactory factory);
- virtual SharedPtr<Shared::EngineInterface> interface(
+ virtual SharedPtr<EngineInterface> interface(
const std::string& engine_url);
virtual bool run(const std::string& mime_type,