diff options
author | David Robillard <d@drobilla.net> | 2007-01-22 05:00:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-22 05:00:29 +0000 |
commit | ea3586e44a1621f97298e667a79f4c4f75f902ba (patch) | |
tree | 690673160bab500b197b0be8551daf55e927104b /src/libs | |
parent | 6fc1fa0d3bec4b82cb3af4c4e887241087899e7e (diff) | |
download | ingen-ea3586e44a1621f97298e667a79f4c4f75f902ba.tar.gz ingen-ea3586e44a1621f97298e667a79f4c4f75f902ba.tar.bz2 ingen-ea3586e44a1621f97298e667a79f4c4f75f902ba.zip |
Created Raul namespace.
git-svn-id: http://svn.drobilla.net/lad/ingen@265 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
33 files changed, 81 insertions, 61 deletions
diff --git a/src/libs/client/Loader.cpp b/src/libs/client/Loader.cpp index aebe4c80..8424ba80 100644 --- a/src/libs/client/Loader.cpp +++ b/src/libs/client/Loader.cpp @@ -20,6 +20,8 @@ #include "Loader.h" #include "ModelEngineInterface.h" +using namespace Raul; + namespace Ingen { namespace Client { diff --git a/src/libs/client/Loader.h b/src/libs/client/Loader.h index d252520d..bc29f563 100644 --- a/src/libs/client/Loader.h +++ b/src/libs/client/Loader.h @@ -23,6 +23,8 @@ #include "raul/Namespaces.h" #include "ObjectModel.h" +using Raul::Namespaces; + namespace Ingen { namespace Client { diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index 45b8d794..5b4d66d9 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -20,7 +20,9 @@ #include <cassert> #include <cstring> #include <iostream> + using std::cerr; using std::cout; using std::endl; +using namespace Raul; namespace Ingen { namespace Client { diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp index 6ba3dfb5..fce24116 100644 --- a/src/libs/client/OSCEngineSender.cpp +++ b/src/libs/client/OSCEngineSender.cpp @@ -371,9 +371,9 @@ OSCEngineSender::midi_learn(const string& node_path) void -OSCEngineSender::set_metadata(const string& obj_path, - const string& predicate, - const Atom& value) +OSCEngineSender::set_metadata(const string& obj_path, + const string& predicate, + const Raul::Atom& value) { assert(_engine_addr); @@ -381,7 +381,7 @@ OSCEngineSender::set_metadata(const string& obj_path, lo_message_add_int32(m, next_id()); lo_message_add_string(m, obj_path.c_str()); lo_message_add_string(m, predicate.c_str()); - AtomLiblo::lo_message_add_atom(m, value); + Raul::AtomLiblo::lo_message_add_atom(m, value); lo_send_message(_engine_addr, "/om/metadata/set", m); } diff --git a/src/libs/client/OSCEngineSender.h b/src/libs/client/OSCEngineSender.h index e46542b6..9f0a6137 100644 --- a/src/libs/client/OSCEngineSender.h +++ b/src/libs/client/OSCEngineSender.h @@ -26,10 +26,10 @@ using Ingen::Shared::EngineInterface; using Ingen::Shared::ClientInterface; using Ingen::Shared::ClientKey; - namespace Ingen { namespace Client { + /* OSC (via liblo) interface to the engine. * * Clients can use this opaquely as an EngineInterface* to control the engine @@ -123,9 +123,9 @@ public: void midi_learn(const string& node_path); - void set_metadata(const string& obj_path, - const string& predicate, - const Atom& value); + void set_metadata(const string& obj_path, + const string& predicate, + const Raul::Atom& value); // Requests // diff --git a/src/libs/client/ObjectModel.h b/src/libs/client/ObjectModel.h index 12db367b..a9479e9c 100644 --- a/src/libs/client/ObjectModel.h +++ b/src/libs/client/ObjectModel.h @@ -28,8 +28,11 @@ #include "raul/Atom.h" #include "raul/Path.h" #include "raul/SharedPtr.h" + using std::string; using std::map; using std::find; using std::cout; using std::cerr; using std::endl; +using Raul::Atom; +using Raul::Path; namespace Ingen { namespace Client { diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h index 7af4f169..8bc96558 100644 --- a/src/libs/client/PluginModel.h +++ b/src/libs/client/PluginModel.h @@ -84,7 +84,7 @@ public: } } - string default_node_name() { return Path::nameify(m_name); } + string default_node_name() { return Raul::Path::nameify(m_name); } private: Type m_type; diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp index ef19d94d..65dd7b78 100644 --- a/src/libs/client/Serializer.cpp +++ b/src/libs/client/Serializer.cpp @@ -42,6 +42,7 @@ using std::string; using std::vector; using std::pair; using std::cerr; using std::cout; using std::endl; using boost::optional; +using namespace Raul; namespace Ingen { namespace Client { diff --git a/src/libs/client/Serializer.h b/src/libs/client/Serializer.h index 5476002c..b94a10ff 100644 --- a/src/libs/client/Serializer.h +++ b/src/libs/client/Serializer.h @@ -87,9 +87,9 @@ private: void serialize_node(SharedPtr<NodeModel> n, unsigned depth); void serialize_port(SharedPtr<PortModel> p, unsigned depth); - RdfId path_to_node_id(const Path& path); + Raul::RdfId path_to_node_id(const Path& path); - RDFWriter _writer; + Raul::RDFWriter _writer; }; diff --git a/src/libs/client/SigClientInterface.h b/src/libs/client/SigClientInterface.h index d041157a..ce5cefe7 100644 --- a/src/libs/client/SigClientInterface.h +++ b/src/libs/client/SigClientInterface.h @@ -58,7 +58,7 @@ public: sigc::signal<void, string> object_destroyed_sig; sigc::signal<void, string, string> connection_sig; sigc::signal<void, string, string> disconnection_sig; - sigc::signal<void, string, string, Atom> metadata_update_sig; + sigc::signal<void, string, string, Raul::Atom> metadata_update_sig; sigc::signal<void, string, float> control_change_sig; sigc::signal<void, string, uint32_t, uint32_t, string> program_add_sig; sigc::signal<void, string, uint32_t, uint32_t> program_remove_sig; @@ -118,7 +118,7 @@ protected: void disconnection(string src_port_path, string dst_port_path) { disconnection_sig.emit(src_port_path, dst_port_path); } - void metadata_update(string path, string key, Atom value) + void metadata_update(string path, string key, Raul::Atom value) { metadata_update_sig.emit(path, key, value); } void control_change(string port_path, float value) diff --git a/src/libs/client/Store.h b/src/libs/client/Store.h index 68103482..2ca347b4 100644 --- a/src/libs/client/Store.h +++ b/src/libs/client/Store.h @@ -28,6 +28,8 @@ #include "interface/EngineInterface.h" using std::string; using std::map; using std::list; using Ingen::Shared::EngineInterface; +using Raul::Path; +using Raul::Atom; namespace Ingen { namespace Client { diff --git a/src/libs/client/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h index 0a2b8652..53454250 100644 --- a/src/libs/client/ThreadedSigClientInterface.h +++ b/src/libs/client/ThreadedSigClientInterface.h @@ -118,7 +118,7 @@ public: void disconnection(string src_port_path, string dst_port_path) { push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); } - void metadata_update(string path, string key, Atom value) + void metadata_update(string path, string key, Raul::Atom value) { push_sig(sigc::bind(metadata_update_slot, path, key, value)); } void control_change(string port_path, float value) @@ -138,8 +138,8 @@ private: bool _enabled; - SRSWQueue<Closure> _sigs; - uint32_t _num_plugins; + Raul::SRSWQueue<Closure> _sigs; + uint32_t _num_plugins; sigc::slot<void> bundle_begin_slot; sigc::slot<void> bundle_end_slot; @@ -157,7 +157,7 @@ private: sigc::slot<void, string> object_destroyed_slot; sigc::slot<void, string, string> object_renamed_slot; sigc::slot<void, string, string> disconnection_slot; - sigc::slot<void, string, string, Atom> metadata_update_slot; + sigc::slot<void, string, string, Raul::Atom> metadata_update_slot; sigc::slot<void, string, float> control_change_slot; sigc::slot<void, string, uint32_t, uint32_t, string> program_add_slot; sigc::slot<void, string, uint32_t, uint32_t> program_remove_slot; diff --git a/src/libs/engine/AudioDriver.h b/src/libs/engine/AudioDriver.h index a2f4ac50..448163eb 100644 --- a/src/libs/engine/AudioDriver.h +++ b/src/libs/engine/AudioDriver.h @@ -41,7 +41,7 @@ public: virtual Patch* root_patch() = 0; virtual void add_port(DriverPort* port) = 0; - virtual DriverPort* remove_port(const Path& path) = 0; + virtual DriverPort* remove_port(const Raul::Path& path) = 0; virtual SampleCount buffer_size() const = 0; virtual SampleCount sample_rate() const = 0; diff --git a/src/libs/engine/ClientBroadcaster.h b/src/libs/engine/ClientBroadcaster.h index 529dffdb..577eedd3 100644 --- a/src/libs/engine/ClientBroadcaster.h +++ b/src/libs/engine/ClientBroadcaster.h @@ -83,7 +83,7 @@ public: void send_all_objects(); void send_patch_enable(const string& patch_path); void send_patch_disable(const string& patch_path); - void send_metadata_update(const string& node_path, const string& key, const Atom& value); + void send_metadata_update(const string& node_path, const string& key, const Raul::Atom& value); void send_control_change(const string& port_path, float value); void send_program_add(const string& node_path, int bank, int program, const string& name); void send_program_remove(const string& node_path, int bank, int program); diff --git a/src/libs/engine/Driver.h b/src/libs/engine/Driver.h index e611eff8..c404ac12 100644 --- a/src/libs/engine/Driver.h +++ b/src/libs/engine/Driver.h @@ -79,8 +79,8 @@ public: */ virtual DriverPort* create_port(DuplexPort<T>* patch_port) = 0; - virtual void add_port(DriverPort* port) = 0; - virtual DriverPort* remove_port(const Path& path) = 0; + virtual void add_port(DriverPort* port) = 0; + virtual DriverPort* remove_port(const Raul::Path& path) = 0; }; diff --git a/src/libs/engine/Event.h b/src/libs/engine/Event.h index c2e18949..c740dccd 100644 --- a/src/libs/engine/Event.h +++ b/src/libs/engine/Event.h @@ -24,6 +24,9 @@ #include "Responder.h" #include "ThreadManager.h" +namespace Raul { class Path; } +using Raul::Path; + namespace Ingen { class Engine; diff --git a/src/libs/engine/GraphObject.h b/src/libs/engine/GraphObject.h index b43ddf88..fe3699fd 100644 --- a/src/libs/engine/GraphObject.h +++ b/src/libs/engine/GraphObject.h @@ -25,7 +25,10 @@ #include "raul/Path.h" #include "raul/Atom.h" #include "types.h" + using std::string; +using Raul::Atom; +using Raul::Path; namespace Ingen { diff --git a/src/libs/engine/JackAudioDriver.h b/src/libs/engine/JackAudioDriver.h index 38c908a6..9bcaf856 100644 --- a/src/libs/engine/JackAudioDriver.h +++ b/src/libs/engine/JackAudioDriver.h @@ -83,11 +83,11 @@ public: void enable(); void disable(); - DriverPort* port(const Path& path); + DriverPort* port(const Raul::Path& path); DriverPort* create_port(DuplexPort<Sample>* patch_port); void add_port(DriverPort* port); - DriverPort* remove_port(const Path& path); + DriverPort* remove_port(const Raul::Path& path); Patch* root_patch() { return _root_patch; } void set_root_patch(Patch* patch) { _root_patch = patch; } @@ -125,7 +125,7 @@ private: int _sample_rate_cb(jack_nframes_t nframes); Engine& _engine; - Thread* _jack_thread; + Raul::Thread* _jack_thread; jack_client_t* _client; jack_nframes_t _buffer_size; jack_nframes_t _sample_rate; diff --git a/src/libs/engine/JackMidiDriver.h b/src/libs/engine/JackMidiDriver.h index d61498e5..bb118a06 100644 --- a/src/libs/engine/JackMidiDriver.h +++ b/src/libs/engine/JackMidiDriver.h @@ -81,7 +81,7 @@ public: { return new JackMidiPort(this, patch_port); } void add_port(DriverPort* port); - DriverPort* remove_port(const Path& path); + DriverPort* remove_port(const Raul::Path& path); jack_client_t* jack_client() { return _client; } diff --git a/src/libs/engine/Maid.h b/src/libs/engine/Maid.h index d8dbfc7e..717cc428 100644 --- a/src/libs/engine/Maid.h +++ b/src/libs/engine/Maid.h @@ -44,7 +44,7 @@ public: void cleanup(); private: - SRSWQueue<MaidObject*> _objects; + Raul::SRSWQueue<MaidObject*> _objects; }; diff --git a/src/libs/engine/MidiDriver.h b/src/libs/engine/MidiDriver.h index dba3056d..9f33cf95 100644 --- a/src/libs/engine/MidiDriver.h +++ b/src/libs/engine/MidiDriver.h @@ -69,7 +69,7 @@ public: DriverPort* create_port(DuplexPort<MidiMessage>* patch_port) { return NULL; } void add_port(DriverPort* port) {} - DriverPort* remove_port(const Path& path) { return NULL; } + DriverPort* remove_port(const Raul::Path& path) { return NULL; } void prepare_block(const SampleCount block_start, const SampleCount block_end) {} }; diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index e858e572..e4f7fa2f 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -463,7 +463,7 @@ OSCClientSender::metadata_update(string path, string key, Atom value) lo_message m = lo_message_new(); lo_message_add_string(m, path.c_str()); lo_message_add_string(m, key.c_str()); - AtomLiblo::lo_message_add_atom(m, value); + Raul::AtomLiblo::lo_message_add_atom(m, value); lo_send_message(_address, "/om/metadata/update", m); } diff --git a/src/libs/engine/OSCClientSender.h b/src/libs/engine/OSCClientSender.h index 12ae8bdf..3f6eb8e7 100644 --- a/src/libs/engine/OSCClientSender.h +++ b/src/libs/engine/OSCClientSender.h @@ -108,9 +108,9 @@ public: virtual void disconnection(string src_port_path, string dst_port_path); - virtual void metadata_update(string subject_path, - string predicate, - Atom value); + virtual void metadata_update(string subject_path, + string predicate, + Raul::Atom value); virtual void control_change(string port_path, float value); diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index 5e1590e7..73711ab4 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -771,7 +771,7 @@ OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg const char* node_path = &argv[1]->s; const char* key = &argv[2]->s; - Atom value = AtomLiblo::lo_arg_to_atom(types[3], argv[3]); + Raul::Atom value = Raul::AtomLiblo::lo_arg_to_atom(types[3], argv[3]); set_metadata(node_path, key, value); diff --git a/src/libs/engine/ObjectStore.h b/src/libs/engine/ObjectStore.h index 3f2fcfc3..014d156c 100644 --- a/src/libs/engine/ObjectStore.h +++ b/src/libs/engine/ObjectStore.h @@ -21,7 +21,9 @@ #include <string> #include "raul/Path.h" #include "Tree.h" + using std::string; +using Raul::Path; namespace Ingen { diff --git a/src/libs/engine/Plugin.h b/src/libs/engine/Plugin.h index 0b573cb1..692c4662 100644 --- a/src/libs/engine/Plugin.h +++ b/src/libs/engine/Plugin.h @@ -31,8 +31,6 @@ using std::string; using std::cerr; using std::endl; -class Path; - namespace Ingen { class PluginLibrary; diff --git a/src/libs/engine/PostProcessor.h b/src/libs/engine/PostProcessor.h index 48d0792d..9cd4d29d 100644 --- a/src/libs/engine/PostProcessor.h +++ b/src/libs/engine/PostProcessor.h @@ -37,7 +37,7 @@ class Event; * * \ingroup engine */ -class PostProcessor : public Slave +class PostProcessor : public Raul::Slave { public: PostProcessor(Maid& maid, size_t queue_size); @@ -46,9 +46,9 @@ public: inline void push(Event* const ev) { _events.push(ev); } private: - Maid& _maid; - SRSWQueue<Event*> _events; - virtual void _whipped(); + Maid& _maid; + Raul::SRSWQueue<Event*> _events; + virtual void _whipped(); }; diff --git a/src/libs/engine/QueuedEngineInterface.h b/src/libs/engine/QueuedEngineInterface.h index d40cd1a8..d71c50b1 100644 --- a/src/libs/engine/QueuedEngineInterface.h +++ b/src/libs/engine/QueuedEngineInterface.h @@ -134,9 +134,9 @@ public: virtual void midi_learn(const string& node_path); - virtual void set_metadata(const string& path, - const string& predicate, - const Atom& value); + virtual void set_metadata(const string& path, + const string& predicate, + const Raul::Atom& value); // Requests // diff --git a/src/libs/engine/QueuedEventSource.h b/src/libs/engine/QueuedEventSource.h index 077cf7f2..9d50554d 100644 --- a/src/libs/engine/QueuedEventSource.h +++ b/src/libs/engine/QueuedEventSource.h @@ -42,7 +42,7 @@ class PostProcessor; * * This class is it's own slave. :) */ -class QueuedEventSource : public EventSource, protected Slave +class QueuedEventSource : public EventSource, protected Raul::Slave { public: QueuedEventSource(size_t queued_size, size_t stamped_size); @@ -72,15 +72,15 @@ private: //(FIXME: make this a separate class?) // 2-part queue for events that require pre-processing: - size_t _front; ///< Front of queue - size_t _back; ///< Back of entire queue (1 past index of back element) - size_t _prepared_back; ///< Back of prepared section (1 past index of back prepared element) - const size_t _size; - QueuedEvent** _events; - Semaphore _blocking_semaphore; + size_t _front; ///< Front of queue + size_t _back; ///< Back of entire queue (1 past index of back element) + size_t _prepared_back; ///< Back of prepared section (1 past index of back prepared element) + const size_t _size; + QueuedEvent** _events; + Raul::Semaphore _blocking_semaphore; /** Queue for timestamped events (no pre-processing). */ - SRSWQueue<Event*> _stamped_queue; + Raul::SRSWQueue<Event*> _stamped_queue; }; diff --git a/src/libs/engine/ThreadManager.h b/src/libs/engine/ThreadManager.h index 24ca414c..0325ae19 100644 --- a/src/libs/engine/ThreadManager.h +++ b/src/libs/engine/ThreadManager.h @@ -19,6 +19,8 @@ #include "raul/Thread.h" +using Raul::Thread; + namespace Ingen { diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h index 7328ca91..6e4f11b4 100644 --- a/src/libs/engine/events/ConnectionEvent.h +++ b/src/libs/engine/events/ConnectionEvent.h @@ -57,14 +57,14 @@ private: enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, PORT_NOT_FOUND, TYPE_MISMATCH }; - Path m_src_port_path; - Path m_dst_port_path; + Raul::Path m_src_port_path; + Raul::Path m_dst_port_path; - Patch* m_patch; - Port* m_src_port; - Port* m_dst_port; + Patch* m_patch; + Port* m_src_port; + Port* m_dst_port; - QueuedEvent* m_typed_event; + QueuedEvent* m_typed_event; ErrorType m_error; }; diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h index 23db4faf..6b782ed2 100644 --- a/src/libs/engine/events/RequestMetadataEvent.h +++ b/src/libs/engine/events/RequestMetadataEvent.h @@ -43,10 +43,10 @@ public: void post_process(); private: - string m_path; - string m_key; - Atom m_value; - GraphObject* m_object; + string m_path; + string m_key; + Raul::Atom m_value; + GraphObject* m_object; SharedPtr<ClientInterface> m_client; }; diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h index a795a115..adf73878 100644 --- a/src/libs/engine/events/SetMetadataEvent.h +++ b/src/libs/engine/events/SetMetadataEvent.h @@ -35,7 +35,7 @@ class GraphObject; class SetMetadataEvent : public QueuedEvent { public: - SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value); + SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); @@ -44,7 +44,7 @@ public: private: string m_path; string m_key; - Atom m_value; + Raul::Atom m_value; GraphObject* m_object; }; |