From 8ba6bb943889bfdd58cf4a971a152041c1199cfe Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Apr 2011 12:47:15 +0000 Subject: Put engine code in new Ingen::Engine namespace. Put core interfaces in Ingen namespace (not Ingen::Shared). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3159 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/Connect.cpp | 4 ++-- src/engine/events/Connect.hpp | 2 ++ src/engine/events/CreateNode.cpp | 4 ++-- src/engine/events/CreateNode.hpp | 16 +++++++++------- src/engine/events/CreatePatch.cpp | 6 +++--- src/engine/events/CreatePatch.hpp | 16 +++++++++------- src/engine/events/CreatePort.cpp | 10 +++++----- src/engine/events/CreatePort.hpp | 20 +++++++++++--------- src/engine/events/Deactivate.hpp | 2 ++ src/engine/events/Delete.cpp | 4 ++-- src/engine/events/Delete.hpp | 4 +++- src/engine/events/Disconnect.cpp | 2 ++ src/engine/events/Disconnect.hpp | 4 +++- src/engine/events/DisconnectAll.cpp | 2 ++ src/engine/events/DisconnectAll.hpp | 2 ++ src/engine/events/Get.cpp | 2 ++ src/engine/events/Get.hpp | 2 ++ src/engine/events/LoadPlugins.cpp | 2 ++ src/engine/events/LoadPlugins.hpp | 2 ++ src/engine/events/Move.cpp | 8 ++++---- src/engine/events/Move.hpp | 2 ++ src/engine/events/Ping.hpp | 2 ++ src/engine/events/RegisterClient.cpp | 12 +++++++----- src/engine/events/RegisterClient.hpp | 16 +++++++++------- src/engine/events/RequestMetadata.cpp | 8 +++++--- src/engine/events/RequestMetadata.hpp | 29 +++++++++++++++++------------ src/engine/events/SendBinding.cpp | 4 +++- src/engine/events/SendBinding.hpp | 2 ++ src/engine/events/SendPortActivity.cpp | 2 ++ src/engine/events/SendPortActivity.hpp | 2 ++ src/engine/events/SendPortValue.cpp | 2 ++ src/engine/events/SendPortValue.hpp | 2 ++ src/engine/events/SetMetadata.cpp | 13 +++++++------ src/engine/events/SetMetadata.hpp | 26 ++++++++++++++------------ src/engine/events/SetPortValue.cpp | 8 ++++---- src/engine/events/SetPortValue.hpp | 2 ++ src/engine/events/UnregisterClient.cpp | 2 ++ src/engine/events/UnregisterClient.hpp | 2 ++ 38 files changed, 157 insertions(+), 93 deletions(-) (limited to 'src/engine/events') 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, 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* _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, @@ -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, - SampleCount timestamp, - const Raul::Path& node_path, - const Raul::URI& plugin_uri, - const Shared::Resource::Properties& properties); + Engine& engine, + SharedPtr 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, @@ -81,7 +80,7 @@ CreatePatch::pre_process() if (_parent != NULL && _poly > 1 && _poly == static_cast(_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, - SampleCount timestamp, - const Raul::Path& path, - int poly, - const Shared::Resource::Properties& properties); + Engine& engine, + SharedPtr 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, @@ -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, - SampleCount timestamp, - const Raul::Path& path, - const Raul::URI& type, - bool is_output, - const Shared::Resource::Properties& properties); + Engine& engine, + SharedPtr 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* _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, 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 _removed_bindings; - SharedPtr< Raul::Table > > _removed_table; + SharedPtr< Raul::Table > > _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, 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, 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, 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 > > removed + SharedPtr< Table > > removed = _engine.engine_store()->remove(_store_iterator); assert(removed->size() > 0); - for (Table >::iterator i = removed->begin(); i != removed->end(); ++i) { + for (Table >::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, - SampleCount timestamp, - const URI& uri, - Shared::ClientInterface* client) +RegisterClient::RegisterClient(Engine& engine, + SharedPtr 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, - SampleCount timestamp, - const Raul::URI& uri, - Shared::ClientInterface* client); + RegisterClient(Engine& engine, + SharedPtr 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, SampleCount timestamp, @@ -96,7 +95,9 @@ RequestMetadata::execute(ProcessContext& context) } else { IntrusivePtr obuf = PtrCast(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, - SampleCount timestamp, - Shared::Resource::Graph context, - const Raul::URI& subject, - const Raul::URI& key); + RequestMetadata(Engine& engine, + SharedPtr 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 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, - 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, + 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 _types; std::vector _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 _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, 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(buf); if (ebuf && _value.type() == Atom::BLOB) { @@ -174,7 +173,7 @@ SetPortValue::apply(Context& context) ObjectBuffer* const obuf = dynamic_cast(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, 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 -- cgit v1.2.1