From 6b6cb56b2ceab509569bfca247f108f2be5e25c0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 23 Feb 2013 19:55:13 +0000 Subject: Move Atom implementation out of Raul so it can depend on LV2. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5076 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/client/ClientStore.hpp | 6 +++--- ingen/client/ObjectModel.hpp | 6 +++--- ingen/client/PluginModel.hpp | 4 ++-- ingen/client/PortModel.hpp | 18 ++++++++-------- ingen/client/SigClientInterface.hpp | 4 ++-- ingen/client/ThreadedSigClientInterface.hpp | 33 ++++++++++++++--------------- 6 files changed, 35 insertions(+), 36 deletions(-) (limited to 'ingen/client') diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index e9c85ba9..f53217b4 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -84,9 +84,9 @@ public: void move(const Raul::Path& old_path, const Raul::Path& new_path); - void set_property(const Raul::URI& subject_path, - const Raul::URI& predicate, - const Raul::Atom& value); + void set_property(const Raul::URI& subject_path, + const Raul::URI& predicate, + const Atom& value); void connect(const Raul::Path& tail, const Raul::Path& head); diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp index 52655949..66c3db7c 100644 --- a/ingen/client/ObjectModel.hpp +++ b/ingen/client/ObjectModel.hpp @@ -59,9 +59,9 @@ public: bool is_a(const Raul::URI& type) const; - const Raul::Atom& get_property(const Raul::URI& key) const; + const Atom& get_property(const Raul::URI& key) const; - void on_property(const Raul::URI& uri, const Raul::Atom& value); + void on_property(const Raul::URI& uri, const Atom& value); const Raul::Path& path() const { return _path; } const Raul::Symbol& symbol() const { return _symbol; } @@ -73,7 +73,7 @@ public: // Signals INGEN_SIGNAL(new_child, void, SPtr); INGEN_SIGNAL(removed_child, void, SPtr); - INGEN_SIGNAL(property, void, const Raul::URI&, const Raul::Atom&); + INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&); INGEN_SIGNAL(destroyed, void); INGEN_SIGNAL(moved, void); diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index dea85651..7f409f02 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -55,7 +55,7 @@ public: Type type() const { return _type; } - virtual const Raul::Atom& get_property(const Raul::URI& key) const; + virtual const Atom& get_property(const Raul::URI& key) const; Raul::Symbol default_block_symbol() const; std::string human_name() const; @@ -91,7 +91,7 @@ public: // Signals INGEN_SIGNAL(changed, void); - INGEN_SIGNAL(property, void, const Raul::URI&, const Raul::Atom&); + INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&); protected: friend class ClientStore; diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp index 568975fc..84a5d0d8 100644 --- a/ingen/client/PortModel.hpp +++ b/ingen/client/PortModel.hpp @@ -45,11 +45,11 @@ public: bool supports(const Raul::URI& value_type) const; - inline uint32_t index() const { return _index; } - inline const Raul::Atom& value() const { return get_property(_uris.ingen_value); } - inline bool connected() const { return (_connections > 0); } - inline bool is_input() const { return (_direction == Direction::INPUT); } - inline bool is_output() const { return (_direction == Direction::OUTPUT); } + inline uint32_t index() const { return _index; } + inline const Atom& value() const { return get_property(_uris.ingen_value); } + inline bool connected() const { return (_connections > 0); } + inline bool is_input() const { return (_direction == Direction::INPUT); } + inline bool is_output() const { return (_direction == Direction::OUTPUT); } bool port_property(const Raul::URI& uri) const; @@ -65,12 +65,12 @@ public: inline bool operator==(const PortModel& pm) const { return (path() == pm.path()); } - void on_property(const Raul::URI& uri, const Raul::Atom& value); + void on_property(const Raul::URI& uri, const Atom& value); // Signals - INGEN_SIGNAL(value_changed, void, const Raul::Atom&); - INGEN_SIGNAL(voice_changed, void, uint32_t, const Raul::Atom&); - INGEN_SIGNAL(activity, void, const Raul::Atom&); + INGEN_SIGNAL(value_changed, void, const Atom&); + INGEN_SIGNAL(voice_changed, void, uint32_t, const Atom&); + INGEN_SIGNAL(activity, void, const Atom&); INGEN_SIGNAL(connection, void, SPtr); INGEN_SIGNAL(disconnection, void, SPtr); diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index 900a9923..2210d4f4 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -58,7 +58,7 @@ public: INGEN_SIGNAL(connection, void, Raul::Path, Raul::Path) INGEN_SIGNAL(disconnection, void, Raul::Path, Raul::Path) INGEN_SIGNAL(disconnect_all, void, Raul::Path, Raul::Path) - INGEN_SIGNAL(property_change, void, Raul::URI, Raul::URI, Raul::Atom) + INGEN_SIGNAL(property_change, void, Raul::URI, Raul::URI, Atom) /** Fire pending signals. Only does anything on derived classes (that may queue) */ virtual bool emit_signals() { return false; } @@ -106,7 +106,7 @@ protected: void disconnect_all(const Raul::Path& graph, const Raul::Path& path) { EMIT(disconnect_all, graph, path); } - void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) + void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value) { EMIT(property_change, subject, key, value); } void set_response_id(int32_t id) {} diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp index d4e5f6d6..562c5fca 100644 --- a/ingen/client/ThreadedSigClientInterface.hpp +++ b/ingen/client/ThreadedSigClientInterface.hpp @@ -25,11 +25,10 @@ #include #include -#include "raul/Atom.hpp" -#include "raul/SRSWQueue.hpp" - +#include "ingen/Atom.hpp" #include "ingen/Interface.hpp" #include "ingen/client/SigClientInterface.hpp" +#include "raul/SRSWQueue.hpp" /** Returns nothing and takes no parameters (because they have all been bound) */ typedef sigc::slot Closure; @@ -104,7 +103,7 @@ public: void disconnect_all(const Raul::Path& graph, const Raul::Path& path) { push_sig(sigc::bind(disconnect_all_slot, graph, path)); } - void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) + void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value) { push_sig(sigc::bind(property_change_slot, subject, key, value)); } /** Process all queued events - Called from GTK thread to emit signals. */ @@ -145,21 +144,21 @@ private: Raul::SRSWQueue _sigs; - sigc::slot bundle_begin_slot; - sigc::slot bundle_end_slot; - sigc::slot response_slot; - sigc::slot error_slot; - sigc::slot new_plugin_slot; + sigc::slot bundle_begin_slot; + sigc::slot bundle_end_slot; + sigc::slot response_slot; + sigc::slot error_slot; + sigc::slot new_plugin_slot; sigc::slot put_slot; + Resource::Graph> put_slot; sigc::slot delta_slot; - sigc::slot connection_slot; - sigc::slot object_deleted_slot; - sigc::slot object_moved_slot; - sigc::slot disconnection_slot; - sigc::slot disconnect_all_slot; - sigc::slot property_change_slot; + Resource::Properties> delta_slot; + sigc::slot connection_slot; + sigc::slot object_deleted_slot; + sigc::slot object_moved_slot; + sigc::slot disconnection_slot; + sigc::slot disconnect_all_slot; + sigc::slot property_change_slot; }; } // namespace Client -- cgit v1.2.1