From fa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Feb 2017 23:18:59 +0100 Subject: Move Properties out of Resource --- ingen/AtomReader.hpp | 4 +- ingen/AtomWriter.hpp | 14 +-- ingen/Interface.hpp | 12 +-- ingen/Parser.hpp | 2 - ingen/Properties.hpp | 92 ++++++++++++++++ ingen/Resource.hpp | 63 +---------- ingen/Tee.hpp | 12 +-- ingen/client/ClientStore.hpp | 12 +-- ingen/client/PluginModel.hpp | 8 +- ingen/client/SigClientInterface.hpp | 16 +-- ingen/client/ThreadedSigClientInterface.hpp | 15 ++- src/AtomReader.cpp | 10 +- src/AtomWriter.cpp | 16 +-- src/Parser.cpp | 162 ++++++++++++++-------------- src/Resource.cpp | 6 +- src/Serialiser.cpp | 16 ++- src/client/ClientStore.cpp | 19 ++-- src/client/ObjectModel.cpp | 2 +- src/client/PluginModel.cpp | 8 +- src/gui/App.cpp | 6 +- src/gui/App.hpp | 6 +- src/gui/GraphBox.cpp | 2 +- src/gui/GraphCanvas.cpp | 42 ++++---- src/gui/GraphCanvas.hpp | 2 +- src/gui/GraphPortModule.cpp | 4 +- src/gui/LoadGraphWindow.cpp | 2 +- src/gui/LoadGraphWindow.hpp | 4 +- src/gui/LoadPluginWindow.cpp | 8 +- src/gui/LoadPluginWindow.hpp | 4 +- src/gui/NewSubgraphWindow.cpp | 8 +- src/gui/NewSubgraphWindow.hpp | 4 +- src/gui/NodeMenu.cpp | 2 +- src/gui/ObjectMenu.cpp | 6 +- src/gui/PortMenu.cpp | 8 +- src/gui/PropertiesWindow.cpp | 8 +- src/gui/RDFS.cpp | 4 +- src/gui/SubgraphModule.cpp | 4 +- src/gui/ThreadedLoader.cpp | 18 ++-- src/gui/ThreadedLoader.hpp | 18 ++-- src/gui/WindowFactory.cpp | 8 +- src/gui/WindowFactory.hpp | 2 - src/gui/ingen_gui_lv2.cpp | 5 +- src/server/Broadcaster.hpp | 12 +-- src/server/ClientUpdate.cpp | 10 +- src/server/ClientUpdate.hpp | 12 +-- src/server/DuplexPort.cpp | 8 +- src/server/DuplexPort.hpp | 6 +- src/server/Engine.cpp | 8 +- src/server/EventWriter.cpp | 12 +-- src/server/EventWriter.hpp | 12 +-- src/server/NodeImpl.cpp | 2 +- src/server/PortImpl.hpp | 6 +- src/server/events/Connect.hpp | 8 +- src/server/events/CreateBlock.cpp | 16 +-- src/server/events/CreateBlock.hpp | 24 ++--- src/server/events/CreateGraph.cpp | 24 ++--- src/server/events/CreateGraph.hpp | 26 ++--- src/server/events/CreatePort.cpp | 18 ++-- src/server/events/CreatePort.hpp | 32 +++--- src/server/events/Delta.cpp | 8 +- src/server/events/Delta.hpp | 26 ++--- tests/ingen_test.cpp | 13 +-- 62 files changed, 485 insertions(+), 462 deletions(-) create mode 100644 ingen/Properties.hpp diff --git a/ingen/AtomReader.hpp b/ingen/AtomReader.hpp index 1c1dea5b..8a1a80aa 100644 --- a/ingen/AtomReader.hpp +++ b/ingen/AtomReader.hpp @@ -52,8 +52,8 @@ private: boost::optional atom_to_uri(const LV2_Atom* atom); boost::optional atom_to_path(const LV2_Atom* atom); - void get_props(const LV2_Atom_Object* obj, - Ingen::Resource::Properties& props); + void get_props(const LV2_Atom_Object* obj, + Ingen::Properties& props); URIMap& _map; URIs& _uris; diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp index 4246e884..35db84a4 100644 --- a/ingen/AtomWriter.hpp +++ b/ingen/AtomWriter.hpp @@ -46,13 +46,13 @@ public: void bundle_end(); - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx = Resource::Graph::DEFAULT); + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT); - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add); + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add); void copy(const Raul::URI& old_uri, const Raul::URI& new_uri); @@ -89,7 +89,7 @@ public: private: void forge_uri(const Raul::URI& uri); - void forge_properties(const Resource::Properties& properties); + void forge_properties(const Properties& properties); void forge_arc(const Raul::Path& tail, const Raul::Path& head); void forge_request(LV2_Atom_Forge_Frame* frame, LV2_URID type); diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp index 8a79f269..e37888f9 100644 --- a/ingen/Interface.hpp +++ b/ingen/Interface.hpp @@ -64,13 +64,13 @@ public: /** End a transaction. */ virtual void bundle_end() = 0; - virtual void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT) = 0; + virtual void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) = 0; - virtual void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) = 0; + virtual void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) = 0; virtual void copy(const Raul::URI& old_uri, const Raul::URI& new_uri) = 0; diff --git a/ingen/Parser.hpp b/ingen/Parser.hpp index d6065e59..dd3bfb46 100644 --- a/ingen/Parser.hpp +++ b/ingen/Parser.hpp @@ -44,8 +44,6 @@ public: virtual ~Parser() {} - typedef Node::Properties Properties; - /** Record of a resource listed in a bundle manifest. */ struct ResourceRecord { inline ResourceRecord(const std::string& u, const std::string& f) diff --git a/ingen/Properties.hpp b/ingen/Properties.hpp new file mode 100644 index 00000000..ef608574 --- /dev/null +++ b/ingen/Properties.hpp @@ -0,0 +1,92 @@ +/* + This file is part of Ingen. + Copyright 2007-2017 David Robillard + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or any later version. + + Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see . +*/ + +#ifndef INGEN_PROPERTIES_HPP +#define INGEN_PROPERTIES_HPP + +#include + +#include "ingen/Atom.hpp" +#include "ingen/URIs.hpp" +#include "raul/URI.hpp" + +namespace Ingen { + +/** A property value (an Atom with a context). */ +class Property : public Atom { +public: + enum class Graph { + DEFAULT, + EXTERNAL, + INTERNAL + }; + + Property(const Atom& atom, Graph ctx=Graph::DEFAULT) + : Atom(atom) + , _ctx(ctx) + {} + + Property(const URIs::Quark& quark, Graph ctx=Graph::DEFAULT) + : Atom(quark.urid) + , _ctx(ctx) + {} + + Graph context() const { return _ctx; } + void set_context(Graph ctx) { _ctx = ctx; } + +private: + Graph _ctx; +}; + +class Properties : public std::multimap { +public: + using Graph = Property::Graph; + + Properties() {} + + Properties(const Properties& copy) + : std::multimap(copy) + {} + + Properties(std::initializer_list l) + : std::multimap(l) + {} + + void put(const Raul::URI& key, + const Atom& value, + Graph ctx = Graph::DEFAULT) { + insert(std::make_pair(key, Property(value, ctx))); + } + + void put(const Raul::URI& key, + const URIs::Quark& value, + Graph ctx = Graph::DEFAULT) { + insert(std::make_pair(key, Property(value, ctx))); + } + + bool contains(const Raul::URI& key, const Atom& value) { + for (const_iterator i = find(key); i != end() && i->first == key; ++i) { + if (i->second == value) { + return true; + } + } + return false; + } +}; + +} // namespace Ingen + +#endif // INGEN_PROPERTIES_HPP diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp index 39452522..3eb1349f 100644 --- a/ingen/Resource.hpp +++ b/ingen/Resource.hpp @@ -21,6 +21,7 @@ #include #include "ingen/Atom.hpp" +#include "ingen/Properties.hpp" #include "ingen/URIs.hpp" #include "ingen/ingen.h" #include "raul/Deletable.hpp" @@ -38,6 +39,8 @@ namespace Ingen { class INGEN_API Resource : public Raul::Deletable { public: + using Graph = Property::Graph; + Resource(const URIs& uris, const Raul::URI& uri) : _uris(uris) , _uri(uri) @@ -52,12 +55,6 @@ public: return *this; } - enum class Graph { - DEFAULT, - EXTERNAL, - INTERNAL - }; - static Raul::URI graph_to_uri(Graph g) { switch (g) { case Graph::DEFAULT: return Raul::URI(INGEN_NS "defaultContext"); @@ -81,62 +78,8 @@ public: } } - /** A property value (an Atom with a context). */ - class Property : public Atom { - public: - Property(const Atom& atom, Graph ctx=Graph::DEFAULT) - : Atom(atom) - , _ctx(ctx) - {} - - Property(const URIs::Quark& quark, Graph ctx=Graph::DEFAULT) - : Atom(quark.urid) - , _ctx(ctx) - {} - - Graph context() const { return _ctx; } - void set_context(Graph ctx) { _ctx = ctx; } - - private: - Graph _ctx; - }; - virtual ~Resource() {} - class Properties : public std::multimap { - public: - Properties() {} - - Properties(const Properties& copy) - : std::multimap(copy) - {} - - Properties(std::initializer_list l) - : std::multimap(l) - {} - - void put(const Raul::URI& key, - const Atom& value, - Graph ctx = Graph::DEFAULT) { - insert(std::make_pair(key, Property(value, ctx))); - } - - void put(const Raul::URI& key, - const URIs::Quark& value, - Graph ctx = Graph::DEFAULT) { - insert(std::make_pair(key, Property(value, ctx))); - } - - bool contains(const Raul::URI& key, const Atom& value) { - for (const_iterator i = find(key); i != end() && i->first == key; ++i) { - if (i->second == value) { - return true; - } - } - return false; - } - }; - /** Get a single property value. * * This is only useful for properties with a single value. If the diff --git a/ingen/Tee.hpp b/ingen/Tee.hpp index 1577f6dd..2cbd84d6 100644 --- a/ingen/Tee.hpp +++ b/ingen/Tee.hpp @@ -63,15 +63,15 @@ public: void bundle_begin() { BROADCAST(bundle_begin); } void bundle_end() { BROADCAST(bundle_end); } - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT) { + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) { BROADCAST(put, uri, properties); } - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) { + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { BROADCAST(delta, uri, remove, add); } diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index de603458..84a95b7b 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -73,13 +73,13 @@ public: URIs& uris() { return _uris; } - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT); + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT); - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add); + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add); void copy(const Raul::URI& old_uri, const Raul::URI& new_uri); diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index e468aede..ad425904 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -48,10 +48,10 @@ class PluginUI; class INGEN_API PluginModel : public Ingen::Resource { public: - PluginModel(URIs& uris, - const Raul::URI& uri, - const Atom& type, - const Ingen::Resource::Properties& properties); + PluginModel(URIs& uris, + const Raul::URI& uri, + const Atom& type, + const Ingen::Properties& properties); const Atom& type() const { return _type; } const Raul::URI type_uri() const { diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index 33430480..a65806f4 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -52,8 +52,8 @@ public: INGEN_SIGNAL(bundle_begin, void) INGEN_SIGNAL(bundle_end, void) INGEN_SIGNAL(error, void, std::string) - INGEN_SIGNAL(put, void, Raul::URI, Resource::Properties, Resource::Graph) - INGEN_SIGNAL(delta, void, Raul::URI, Resource::Properties, Resource::Properties) + INGEN_SIGNAL(put, void, Raul::URI, Properties, Resource::Graph) + INGEN_SIGNAL(delta, void, Raul::URI, Properties, Properties) INGEN_SIGNAL(object_copied, void, Raul::URI, Raul::URI) INGEN_SIGNAL(object_moved, void, Raul::Path, Raul::Path) INGEN_SIGNAL(object_deleted, void, Raul::URI) @@ -83,14 +83,14 @@ protected: void error(const std::string& msg) { EMIT(error, msg); } - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT) + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) { EMIT(put, uri, properties, ctx); } - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { EMIT(delta, uri, remove, add); } void connect(const Raul::Path& tail, const Raul::Path& head) diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp index 79795421..db3aad44 100644 --- a/ingen/client/ThreadedSigClientInterface.hpp +++ b/ingen/client/ThreadedSigClientInterface.hpp @@ -80,14 +80,14 @@ public: void error(const std::string& msg) { push_sig(sigc::bind(error_slot, msg)); } - void put(const Raul::URI& path, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT) + void put(const Raul::URI& path, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) { push_sig(sigc::bind(put_slot, path, properties, ctx)); } - void delta(const Raul::URI& path, - const Resource::Properties& remove, - const Resource::Properties& add) + void delta(const Raul::URI& path, + const Properties& remove, + const Properties& add) { push_sig(sigc::bind(delta_slot, path, remove, add)); } void connect(const Raul::Path& tail, const Raul::Path& head) @@ -149,8 +149,7 @@ private: Raul::SRSWQueue _sigs; - typedef Resource::Properties Properties; - typedef Resource::Graph Graph; + typedef Resource::Graph Graph; sigc::slot bundle_begin_slot; sigc::slot bundle_end_slot; diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp index 90f0ac9f..57aa09bb 100644 --- a/src/AtomReader.cpp +++ b/src/AtomReader.cpp @@ -52,8 +52,8 @@ AtomReader::get_atom(const LV2_Atom* in, Atom& out) } void -AtomReader::get_props(const LV2_Atom_Object* obj, - Ingen::Resource::Properties& props) +AtomReader::get_props(const LV2_Atom_Object* obj, + Ingen::Properties& props) { if (obj->body.otype) { const Atom type(sizeof(int32_t), _uris.atom_URID, &obj->body.otype); @@ -217,7 +217,7 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id) _log.warn("Arc has non-path tail or head\n"); } } else { - Ingen::Resource::Properties props; + Ingen::Properties props; get_props(body, props); _iface.put(*subject_uri, props); } @@ -266,10 +266,10 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id) return false; } - Ingen::Resource::Properties add_props; + Ingen::Properties add_props; get_props(add, add_props); - Ingen::Resource::Properties remove_props; + Ingen::Properties remove_props; get_props(remove, remove_props); _iface.delta(*subject_uri, remove_props, add_props); diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp index d8fde03f..2fc3ee18 100644 --- a/src/AtomWriter.cpp +++ b/src/AtomWriter.cpp @@ -129,7 +129,7 @@ AtomWriter::forge_uri(const Raul::URI& uri) } void -AtomWriter::forge_properties(const Resource::Properties& properties) +AtomWriter::forge_properties(const Properties& properties) { for (auto p : properties) { lv2_atom_forge_key(&_forge, _map.map_uri(p.first.c_str())); @@ -185,14 +185,14 @@ AtomWriter::forge_request(LV2_Atom_Forge_Frame* frame, LV2_URID type) * patch:subject ; * patch:body [ * a ingen:Block ; - * lv2:prototype + * lv2:prototype * ] . * @endcode */ void -AtomWriter::put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx) +AtomWriter::put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx) { LV2_Atom_Forge_Frame msg; forge_request(&msg, _uris.patch_Put); @@ -236,9 +236,9 @@ AtomWriter::put(const Raul::URI& uri, * @endcode */ void -AtomWriter::delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) +AtomWriter::delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { LV2_Atom_Forge_Frame msg; forge_request(&msg, _uris.patch_Patch); diff --git a/src/Parser.cpp b/src/Parser.cpp index 145f7fc5..c26553a9 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -122,7 +122,7 @@ skip_property(Ingen::URIs& uris, const Sord::Node& predicate) predicate.to_string() == uris.lv2_port); } -static Resource::Properties +static Properties get_properties(Ingen::World* world, Sord::Model& model, const Sord::Node& subject, @@ -137,7 +137,7 @@ get_properties(Ingen::World* world, AtomForgeSink out(&forge); const Sord::Node nil; - Resource::Properties props; + Properties props; for (Sord::Iter i = model.find(subject, nil, nil); !i.end(); ++i) { if (!skip_property(world->uris(), i.get_predicate())) { out.clear(); @@ -148,7 +148,7 @@ get_properties(Ingen::World* world, atomm = world->forge().alloc( atom->size, atom->type, LV2_ATOM_BODY_CONST(atom)); props.insert(make_pair(Raul::URI(i.get_predicate().to_string()), - Resource::Property(atomm, ctx))); + Property(atomm, ctx))); } } @@ -156,7 +156,7 @@ get_properties(Ingen::World* world, return props; } -typedef std::pair PortRecord; +typedef std::pair PortRecord; static boost::optional get_port(Ingen::World* world, @@ -169,11 +169,11 @@ get_port(Ingen::World* world, const URIs& uris = world->uris(); // Get all properties - Resource::Properties props = get_properties(world, model, subject, ctx); + Properties props = get_properties(world, model, subject, ctx); // Get index if requested (for Graphs) if (index && ctx == Resource::Graph::INTERNAL) { - Resource::Properties::const_iterator i = props.find(uris.lv2_index); + Properties::const_iterator i = props.find(uris.lv2_index); if (i == props.end() || i->second.type() != world->forge().Int || i->second.get() < 0) { @@ -184,8 +184,8 @@ get_port(Ingen::World* world, } // Get symbol - Resource::Properties::const_iterator s = props.find(uris.lv2_symbol); - std::string sym; + Properties::const_iterator s = props.find(uris.lv2_symbol); + std::string sym; if (s != props.end() && s->second.type() == world->forge().String) { sym = s->second.ptr(); } else { @@ -212,46 +212,46 @@ get_port(Ingen::World* world, static boost::optional parse( - World* world, - Interface* target, - Sord::Model& model, - const std::string& base_uri, - Sord::Node& subject, - boost::optional parent = boost::optional(), - boost::optional symbol = boost::optional(), - boost::optional data = boost::optional()); + World* world, + Interface* target, + Sord::Model& model, + const std::string& base_uri, + Sord::Node& subject, + boost::optional parent = boost::optional(), + boost::optional symbol = boost::optional(), + boost::optional data = boost::optional()); static boost::optional parse_graph( - World* world, - Interface* target, - Sord::Model& model, - const std::string& base_uri, - const Sord::Node& subject, - Resource::Graph ctx, - boost::optional parent = boost::optional(), - boost::optional symbol = boost::optional(), - boost::optional data = boost::optional()); + World* world, + Interface* target, + Sord::Model& model, + const std::string& base_uri, + const Sord::Node& subject, + Resource::Graph ctx, + boost::optional parent = boost::optional(), + boost::optional symbol = boost::optional(), + boost::optional data = boost::optional()); static boost::optional parse_block( - World* world, - Interface* target, - Sord::Model& model, - const std::string& base_uri, - const Sord::Node& subject, - const Raul::Path& path, - boost::optional data = boost::optional()); + World* world, + Interface* target, + Sord::Model& model, + const std::string& base_uri, + const Sord::Node& subject, + const Raul::Path& path, + boost::optional data = boost::optional()); static bool parse_properties( - World* world, - Interface* target, - Sord::Model& model, - const Sord::Node& subject, - Resource::Graph ctx, - const Raul::URI& uri, - boost::optional data = boost::optional()); + World* world, + Interface* target, + Sord::Model& model, + const Sord::Node& subject, + Resource::Graph ctx, + const Raul::URI& uri, + boost::optional data = boost::optional()); static bool parse_arcs( @@ -263,13 +263,13 @@ parse_arcs( const Raul::Path& graph); static boost::optional -parse_block(Ingen::World* world, - Ingen::Interface* target, - Sord::Model& model, - const std::string& base_uri, - const Sord::Node& subject, - const Raul::Path& path, - boost::optional data) +parse_block(Ingen::World* world, + Ingen::Interface* target, + Sord::Model& model, + const std::string& base_uri, + const Sord::Node& subject, + const Raul::Path& path, + boost::optional data) { const URIs& uris = world->uris(); @@ -329,7 +329,7 @@ parse_block(Ingen::World* world, path.parent(), Raul::Symbol(path.symbol())); } else { // Prototype is non-file URI, plugin - Resource::Properties props = get_properties( + Properties props = get_properties( world, model, subject, Resource::Graph::DEFAULT); props.insert(make_pair(uris.rdf_type, uris.forge.make_urid(uris.ingen_Block))); @@ -339,15 +339,15 @@ parse_block(Ingen::World* world, } static boost::optional -parse_graph(Ingen::World* world, - Ingen::Interface* target, - Sord::Model& model, - const std::string& base_uri, - const Sord::Node& subject_node, - Resource::Graph ctx, - boost::optional parent, - boost::optional a_symbol, - boost::optional data) +parse_graph(Ingen::World* world, + Ingen::Interface* target, + Sord::Model& model, + const std::string& base_uri, + const Sord::Node& subject_node, + Resource::Graph ctx, + boost::optional parent, + boost::optional a_symbol, + boost::optional data) { const URIs& uris = world->uris(); @@ -380,7 +380,7 @@ parse_graph(Ingen::World* world, // Create graph Raul::Path graph_path(graph_path_str); - Resource::Properties props = get_properties(world, model, subject_node, ctx); + Properties props = get_properties(world, model, subject_node, ctx); target->put(path_to_uri(graph_path), props, ctx); // For each port on this graph @@ -426,7 +426,7 @@ parse_graph(Ingen::World* world, // Parse and create block parse_block(world, target, model, base_uri, node, block_path, - boost::optional()); + boost::optional()); // For each port on this block for (Sord::Iter p = model.find(node, lv2_port, nil); !p.end(); ++p) { @@ -532,15 +532,15 @@ parse_arcs(Ingen::World* world, } static bool -parse_properties(Ingen::World* world, - Ingen::Interface* target, - Sord::Model& model, - const Sord::Node& subject, - Resource::Graph ctx, - const Raul::URI& uri, - boost::optional data) +parse_properties(Ingen::World* world, + Ingen::Interface* target, + Sord::Model& model, + const Sord::Node& subject, + Resource::Graph ctx, + const Raul::URI& uri, + boost::optional data) { - Resource::Properties properties = get_properties(world, model, subject, ctx); + Properties properties = get_properties(world, model, subject, ctx); target->put(uri, properties); @@ -552,14 +552,14 @@ parse_properties(Ingen::World* world, } static boost::optional -parse(Ingen::World* world, - Ingen::Interface* target, - Sord::Model& model, - const std::string& base_uri, - Sord::Node& subject, - boost::optional parent, - boost::optional symbol, - boost::optional data) +parse(Ingen::World* world, + Ingen::Interface* target, + Sord::Model& model, + const std::string& base_uri, + Sord::Node& subject, + boost::optional parent, + boost::optional symbol, + boost::optional data) { const URIs& uris = world->uris(); @@ -629,12 +629,12 @@ parse(Ingen::World* world, } bool -Parser::parse_file(Ingen::World* world, - Ingen::Interface* target, - const std::string& path, - boost::optional parent, - boost::optional symbol, - boost::optional data) +Parser::parse_file(Ingen::World* world, + Ingen::Interface* target, + const std::string& path, + boost::optional parent, + boost::optional symbol, + boost::optional data) { // Get absolute file path std::string file_path = path; @@ -728,7 +728,7 @@ Parser::parse_string(Ingen::World* world, const std::string& base_uri, boost::optional parent, boost::optional symbol, - boost::optional data) + boost::optional data) { // Load string into model Sord::Model model(*world->rdf_world(), base_uri, SORD_SPO|SORD_PSO, false); diff --git a/src/Resource.cpp b/src/Resource.cpp index 18d02a69..623f601a 100644 --- a/src/Resource.cpp +++ b/src/Resource.cpp @@ -31,7 +31,7 @@ Resource::add_property(const Raul::URI& uri, Graph ctx) { // Ignore duplicate statements - typedef Resource::Properties::const_iterator iterator; + typedef Properties::const_iterator iterator; const std::pair range = _properties.equal_range(uri); for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) { if (i->second == value && i->second.context() == ctx) { @@ -154,7 +154,7 @@ Resource::type(const URIs& uris, bool& port, bool& is_output) { - typedef Resource::Properties::const_iterator iterator; + typedef Properties::const_iterator iterator; const std::pair types_range = properties.equal_range(uris.rdf_type); graph = block = port = is_output = false; @@ -221,7 +221,7 @@ Resource::remove_properties(const Properties& props) remove_property(p.first, p.second); } -Resource::Properties +Properties Resource::properties(Resource::Graph ctx) const { Properties props; diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index da88559c..6c70ca8b 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -53,8 +53,6 @@ using namespace Ingen; namespace Ingen { struct Serialiser::Impl { - typedef Resource::Properties Properties; - explicit Impl(World& world) : _root_path("/") , _world(world) @@ -81,8 +79,8 @@ struct Serialiser::Impl { Resource::Graph context, const Sord::Node& id); - void serialise_properties(Sord::Node id, - const Resource::Properties& props); + void serialise_properties(Sord::Node id, + const Properties& props); void write_bundle(SPtr graph, const std::string& uri); @@ -351,7 +349,7 @@ Serialiser::Impl::serialise_graph(SPtr graph, Sord::Literal(world, sym)); } - const Node::Properties props = graph->properties(Resource::Graph::INTERNAL); + const Properties props = graph->properties(Resource::Graph::INTERNAL); serialise_properties(graph_id, props); std::set plugins; @@ -446,7 +444,7 @@ Serialiser::Impl::serialise_block(SPtr block, class_id); // Serialise properties, but remove possibly stale state:state (set again below) - Node::Properties props = block->properties(); + Properties props = block->properties(); props.erase(uris.state_state); serialise_properties(block_id, props); @@ -479,7 +477,7 @@ Serialiser::Impl::serialise_port(const Node* port, { URIs& uris = _world.uris(); Sord::World& world = _model->world(); - Node::Properties props = port->properties(context); + Properties props = port->properties(context); if (context == Resource::Graph::INTERNAL) { // Always write lv2:symbol for Graph ports (required for lv2:Plugin) @@ -561,8 +559,8 @@ skip_property(Ingen::URIs& uris, const Sord::Node& predicate) } void -Serialiser::Impl::serialise_properties(Sord::Node id, - const Node::Properties& props) +Serialiser::Impl::serialise_properties(Sord::Node id, + const Properties& props) { LV2_URID_Unmap* unmap = &_world.uri_map().urid_unmap_feature()->urid_unmap; SerdNode base = serd_node_from_string(SERD_URI, diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 9948fd7b..4ff04957 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -237,11 +237,11 @@ ClientStore::move(const Raul::Path& old_path, const Raul::Path& new_path) } void -ClientStore::put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx) +ClientStore::put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx) { - typedef Resource::Properties::const_iterator Iterator; + typedef Properties::const_iterator Iterator; bool is_graph, is_block, is_port, is_output; Resource::type(uris(), properties, @@ -311,10 +311,7 @@ ClientStore::put(const Raul::URI& uri, const Raul::URI uri(_uris.forge.str(p->second, false)); if (!(plug = _plugin(uri))) { plug = SPtr( - new PluginModel(uris(), - uri, - Atom(), - Resource::Properties())); + new PluginModel(uris(), uri, Atom(), Properties())); add_plugin(plug); } @@ -343,9 +340,9 @@ ClientStore::put(const Raul::URI& uri, } void -ClientStore::delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) +ClientStore::delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { if (uri == Raul::URI("ingen:/clients/this")) { // Client property, which we don't store (yet?) diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index 79c6c67b..94106027 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -62,7 +62,7 @@ const Atom& ObjectModel::get_property(const Raul::URI& key) const { static const Atom null_atom; - Resource::Properties::const_iterator i = properties().find(key); + Properties::const_iterator i = properties().find(key); return (i != properties().end()) ? i->second : null_atom; } diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 3c4d13de..353b0f5c 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -40,10 +40,10 @@ const LilvPlugins* PluginModel::_lilv_plugins = NULL; Sord::World* PluginModel::_rdf_world = NULL; -PluginModel::PluginModel(URIs& uris, - const Raul::URI& uri, - const Atom& type, - const Resource::Properties& properties) +PluginModel::PluginModel(URIs& uris, + const Raul::URI& uri, + const Atom& type, + const Properties& properties) : Resource(uris, uri) , _type(type) , _fetched(false) diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 07e6f262..b1c92ade 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -280,9 +280,9 @@ App::set_tooltip(Gtk::Widget* widget, const LilvNode* node) } void -App::put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx) +App::put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx) { _enable_signal = false; for (const auto& p : properties) { diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 61336747..3dc09ff9 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -143,9 +143,9 @@ protected: bool animate(); void response(int32_t id, Ingen::Status status, const std::string& subject); - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx); + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx); void property_change(const Raul::URI& subject, const Raul::URI& key, diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 6423c016..4aa3589f 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -868,7 +868,7 @@ GraphBox::event_sprung_layout_toggled() _view->canvas()->set_sprung_layout(sprung); - Resource::Properties properties; + Properties properties; properties.insert(make_pair(_app->uris().ingen_sprungLayout, _app->forge().make(sprung))); _app->interface()->put(_graph->uri(), properties); diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 5b1111d7..6d22f407 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -652,7 +652,7 @@ GraphCanvas::copy_selection() void GraphCanvas::paste() { - typedef Node::Properties::const_iterator PropIter; + typedef Properties::const_iterator PropIter; std::lock_guard lock(_app.world()->rdf_mutex()); @@ -674,7 +674,7 @@ GraphCanvas::paste() ClientStore clipboard(_app.world()->uris(), _app.log()); clipboard.set_plugins(_app.store()->plugins()); clipboard.put(main_uri(), - {{uris.rdf_type, Resource::Property(uris.ingen_Graph)}}); + {{uris.rdf_type, Property(uris.ingen_Graph)}}); // Parse clipboard text into clipboard store boost::optional base_uri = parser->parse_string( @@ -727,8 +727,8 @@ GraphCanvas::paste() const Raul::URI& old_uri = path_to_uri(old_path); const Raul::Path& new_path = avoider.map_path(parent.child(node->path())); - Node::Properties props{{uris.lv2_prototype, - _app.forge().make_urid(old_uri)}}; + Properties props{{uris.lv2_prototype, + _app.forge().make_urid(old_uri)}}; // Set the same types const auto t = node->properties().equal_range(uris.rdf_type); @@ -739,13 +739,13 @@ GraphCanvas::paste() PropIter yi = node->properties().find(uris.ingen_canvasY); if (xi != node->properties().end()) { const float x = xi->second.get() - min_x + paste_x; - props.insert({xi->first, Resource::Property(_app.forge().make(x), - xi->second.context())}); + props.insert({xi->first, Property(_app.forge().make(x), + xi->second.context())}); } if (yi != node->properties().end()) { const float y = yi->second.get() - min_y + paste_y; - props.insert({yi->first, Resource::Property(_app.forge().make(y), - yi->second.context())}); + props.insert({yi->first, Property(_app.forge().make(y), + yi->second.context())}); } _app.interface()->put(path_to_uri(new_path), props); @@ -795,16 +795,16 @@ GraphCanvas::menu_add_port(const string& sym_base, const string& name_base, const URIs& uris = _app.uris(); - Resource::Properties props = get_initial_data(Resource::Graph::INTERNAL); + Properties props = get_initial_data(Resource::Graph::INTERNAL); props.insert(make_pair(uris.rdf_type, _app.forge().make_urid(type))); if (type == uris.atom_AtomPort) { props.insert(make_pair(uris.atom_bufferType, - Resource::Property(uris.atom_Sequence))); + Property(uris.atom_Sequence))); } props.insert(make_pair(uris.rdf_type, - Resource::Property(is_output - ? uris.lv2_OutputPort - : uris.lv2_InputPort))); + Property(is_output + ? uris.lv2_OutputPort + : uris.lv2_InputPort))); props.insert(make_pair(uris.lv2_index, _app.forge().make(int32_t(_graph->num_ports())))); props.insert(make_pair(uris.lv2_name, @@ -831,9 +831,9 @@ GraphCanvas::load_plugin(WPtr weak_plugin) const Raul::Path path = _graph->path().child(symbol); // FIXME: polyphony? - Node::Properties props = get_initial_data(); + Properties props = get_initial_data(); props.insert(make_pair(uris.rdf_type, - Resource::Property(uris.ingen_Block))); + Property(uris.ingen_Block))); props.insert(make_pair(uris.lv2_prototype, uris.forge.make_urid(plugin->uri()))); _app.interface()->put(path_to_uri(path), props); @@ -851,19 +851,19 @@ GraphCanvas::get_new_module_location(double& x, double& y) y = scroll_y + 20; } -Node::Properties +Properties GraphCanvas::get_initial_data(Resource::Graph ctx) { - Node::Properties result; + Properties result; const URIs& uris = _app.uris(); result.insert( make_pair(uris.ingen_canvasX, - Resource::Property(_app.forge().make((float)_menu_x), - ctx))); + Property(_app.forge().make((float)_menu_x), + ctx))); result.insert( make_pair(uris.ingen_canvasY, - Resource::Property(_app.forge().make((float)_menu_y), - ctx))); + Property(_app.forge().make((float)_menu_y), + ctx))); return result; } diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 61c695c6..c2212426 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -105,7 +105,7 @@ private: typedef std::multimap LV2Children; - Node::Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); + Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); Ganv::Port* get_port_view(SPtr port); diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp index dd402f9b..7a0ce102 100644 --- a/src/gui/GraphPortModule.cpp +++ b/src/gui/GraphPortModule.cpp @@ -107,8 +107,8 @@ GraphPortModule::store_location(double ax, double ay) { app().interface()->put( _model->uri(), - {{uris.ingen_canvasX, Resource::Property(x, Resource::Graph::INTERNAL)}, - {uris.ingen_canvasY, Resource::Property(y, Resource::Graph::INTERNAL)}}); + {{uris.ingen_canvasX, Property(x, Property::Graph::INTERNAL)}, + {uris.ingen_canvasY, Property(y, Property::Graph::INTERNAL)}}); } } diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index 7c0de2f1..5f8f8e11 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -99,7 +99,7 @@ LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject, void LoadGraphWindow::present(SPtr graph, bool import, - Node::Properties data) + Properties data) { _import = import; set_graph(graph); diff --git a/src/gui/LoadGraphWindow.hpp b/src/gui/LoadGraphWindow.hpp index afd2d172..8ec5ed4b 100644 --- a/src/gui/LoadGraphWindow.hpp +++ b/src/gui/LoadGraphWindow.hpp @@ -52,7 +52,7 @@ public: void present(SPtr graph, bool import, - Node::Properties data); + Properties data); protected: void on_show(); @@ -70,7 +70,7 @@ private: App* _app; - Node::Properties _initial_data; + Properties _initial_data; SPtr _graph; diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 61245b4d..3d6927cb 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -130,7 +130,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, void LoadPluginWindow::present(SPtr graph, - Node::Properties data) + Properties data) { set_graph(graph); _initial_data = data; @@ -391,10 +391,10 @@ LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter) dialog.run(); } else { - Raul::Path path = _graph->path().child(Raul::Symbol::symbolify(name)); - Resource::Properties props = _initial_data; + Raul::Path path = _graph->path().child(Raul::Symbol::symbolify(name)); + Properties props = _initial_data; props.insert(make_pair(uris.rdf_type, - Resource::Property(uris.ingen_Block))); + Property(uris.ingen_Block))); props.insert(make_pair(uris.lv2_prototype, _app->forge().make_urid(plugin->uri()))); props.insert(make_pair(uris.ingen_polyphonic, diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index 5c11656c..e38760a6 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -60,7 +60,7 @@ public: void add_plugin(SPtr plugin); void present(SPtr graph, - Node::Properties data); + Properties data); protected: void on_show(); @@ -128,7 +128,7 @@ private: void load_plugin(const Gtk::TreeModel::iterator& iter); - Node::Properties _initial_data; + Properties _initial_data; SPtr _graph; diff --git a/src/gui/NewSubgraphWindow.cpp b/src/gui/NewSubgraphWindow.cpp index 08382897..b8459bc6 100644 --- a/src/gui/NewSubgraphWindow.cpp +++ b/src/gui/NewSubgraphWindow.cpp @@ -50,7 +50,7 @@ NewSubgraphWindow::NewSubgraphWindow(BaseObjectType* cobject, void NewSubgraphWindow::present(SPtr graph, - Node::Properties data) + Properties data) { set_graph(graph); _initial_data = data; @@ -95,8 +95,8 @@ NewSubgraphWindow::ok_clicked() Raul::Symbol::symbolify(_name_entry->get_text())); // Create graph - Resource::Properties props; - props.insert(make_pair(_app->uris().rdf_type, Resource::Property(_app->uris().ingen_Graph))); + Properties props; + props.insert(make_pair(_app->uris().rdf_type, Property(_app->uris().ingen_Graph))); props.insert(make_pair(_app->uris().ingen_polyphony, _app->forge().make(int32_t(poly)))); props.insert(make_pair(_app->uris().ingen_enabled, _app->forge().make(bool(true)))); _app->interface()->put( @@ -105,7 +105,7 @@ NewSubgraphWindow::ok_clicked() // Set external (block perspective) properties props = _initial_data; props.insert(make_pair(_app->uris().rdf_type, - Resource::Property(_app->uris().ingen_Graph))); + Property(_app->uris().ingen_Graph))); _app->interface()->put( path_to_uri(path), _initial_data, Resource::Graph::EXTERNAL); diff --git a/src/gui/NewSubgraphWindow.hpp b/src/gui/NewSubgraphWindow.hpp index 9bf29302..395856ba 100644 --- a/src/gui/NewSubgraphWindow.hpp +++ b/src/gui/NewSubgraphWindow.hpp @@ -49,14 +49,14 @@ public: void set_graph(SPtr graph); void present(SPtr graph, - Node::Properties data); + Properties data); private: void name_changed(); void ok_clicked(); void cancel_clicked(); - Node::Properties _initial_data; + Properties _initial_data; SPtr _graph; Gtk::Entry* _name_entry; diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index f08754fa..13f41502 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -218,7 +218,7 @@ NodeMenu::on_save_preset_activated() const std::string real_path = Glib::build_filename(dirname, bundle, file); const std::string real_uri = Glib::filename_to_uri(real_path); - Resource::Properties props{ + Properties props{ { _app->uris().rdf_type, _app->uris().pset_Preset }, { _app->uris().rdfs_label, diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index 5f287d15..9b1d095b 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -100,11 +100,11 @@ ObjectMenu::on_menu_learn() void ObjectMenu::on_menu_unlearn() { - Resource::Properties remove; + Properties remove; remove.insert(std::make_pair( _app->uris().midi_binding, - Resource::Property(_app->uris().patch_wildcard))); - _app->interface()->delta(_object->uri(), remove, Resource::Properties()); + Property(_app->uris().patch_wildcard))); + _app->interface()->delta(_object->uri(), remove, Properties()); } void diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 60ce612d..63bd046c 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -130,10 +130,10 @@ PortMenu::on_menu_reset_range() SPtr model = dynamic_ptr_cast(_object); // Remove lv2:minimum and lv2:maximum properties - Resource::Properties remove; - remove.insert({uris.lv2_minimum, Resource::Property(uris.patch_wildcard)}); - remove.insert({uris.lv2_maximum, Resource::Property(uris.patch_wildcard)}); - _app->interface()->delta(_object->uri(), remove, Resource::Properties()); + Properties remove; + remove.insert({uris.lv2_minimum, Property(uris.patch_wildcard)}); + remove.insert({uris.lv2_maximum, Property(uris.patch_wildcard)}); + _app->interface()->delta(_object->uri(), remove, Properties()); } void diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 2b77f93e..dfae695a 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -543,9 +543,9 @@ PropertiesWindow::add_clicked() const Atom& value = get_value(_value_type, _value_bin->get_child()); if (value.is_valid()) { // Send property to engine - Resource::Properties properties; + Properties properties; properties.insert(make_pair(Raul::URI(key_uri.c_str()), - Resource::Property(value))); + Property(value))); _app->interface()->put(_model->uri(), properties); } } @@ -560,8 +560,8 @@ PropertiesWindow::cancel_clicked() void PropertiesWindow::apply_clicked() { - Resource::Properties remove; - Resource::Properties add; + Properties remove; + Properties add; for (const auto& r : _records) { const Raul::URI& uri = r.first; const Record& record = r.second; diff --git a/src/gui/RDFS.cpp b/src/gui/RDFS.cpp index baa51943..b182b989 100644 --- a/src/gui/RDFS.cpp +++ b/src/gui/RDFS.cpp @@ -114,8 +114,8 @@ datatypes(World* world, URISet& types, bool super) URISet types(World* world, SPtr model) { - typedef Resource::Properties::const_iterator PropIter; - typedef std::pair PropRange; + typedef Properties::const_iterator PropIter; + typedef std::pair PropRange; // Start with every rdf:type URISet types; diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp index 1dc4fe49..5c05153f 100644 --- a/src/gui/SubgraphModule.cpp +++ b/src/gui/SubgraphModule.cpp @@ -72,8 +72,8 @@ SubgraphModule::store_location(double ax, double ay) { app().interface()->put( _graph->uri(), - {{uris.ingen_canvasX, Resource::Property(x, Resource::Graph::EXTERNAL)}, - {uris.ingen_canvasY, Resource::Property(y, Resource::Graph::EXTERNAL)}}); + {{uris.ingen_canvasX, Property(x, Resource::Graph::EXTERNAL)}, + {uris.ingen_canvasY, Property(y, Resource::Graph::EXTERNAL)}}); } } diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 98314b66..7f8131ec 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -69,11 +69,11 @@ ThreadedLoader::run() } void -ThreadedLoader::load_graph(bool merge, - const Glib::ustring& document_uri, - optional engine_parent, - optional engine_symbol, - optional engine_data) +ThreadedLoader::load_graph(bool merge, + const Glib::ustring& document_uri, + optional engine_parent, + optional engine_symbol, + optional engine_data) { _mutex.lock(); @@ -98,10 +98,10 @@ ThreadedLoader::load_graph(bool merge, } void -ThreadedLoader::load_graph_event(const Glib::ustring& document_uri, - optional engine_parent, - optional engine_symbol, - optional engine_data) +ThreadedLoader::load_graph_event(const Glib::ustring& document_uri, + optional engine_parent, + optional engine_symbol, + optional engine_data) { std::lock_guard lock(_app.world()->rdf_mutex()); diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index 7870761a..2f12a0e4 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -53,11 +53,11 @@ public: ~ThreadedLoader(); - void load_graph(bool merge, - const Glib::ustring& document_uri, - boost::optional engine_parent, - boost::optional engine_symbol, - boost::optional engine_data); + void load_graph(bool merge, + const Glib::ustring& document_uri, + boost::optional engine_parent, + boost::optional engine_symbol, + boost::optional engine_data); void save_graph(SPtr model, const std::string& filename); @@ -65,10 +65,10 @@ public: SPtr parser(); private: - void load_graph_event(const Glib::ustring& document_uri, - boost::optional engine_parent, - boost::optional engine_symbol, - boost::optional engine_data); + void load_graph_event(const Glib::ustring& document_uri, + boost::optional engine_parent, + boost::optional engine_symbol, + boost::optional engine_data); void save_graph_event(SPtr model, const std::string& filename); diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index a8795d6c..814123fb 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -199,7 +199,7 @@ WindowFactory::remove_graph_window(GraphWindow* win, GdkEventAny* ignored) void WindowFactory::present_load_plugin(SPtr graph, - Node::Properties data) + Properties data) { _app.request_plugins_if_necessary(); @@ -222,7 +222,7 @@ WindowFactory::present_load_plugin(SPtr graph, void WindowFactory::present_load_graph(SPtr graph, - Node::Properties data) + Properties data) { GraphWindowMap::iterator w = _graph_windows.find(graph->path()); @@ -234,7 +234,7 @@ WindowFactory::present_load_graph(SPtr graph, void WindowFactory::present_load_subgraph(SPtr graph, - Node::Properties data) + Properties data) { GraphWindowMap::iterator w = _graph_windows.find(graph->path()); @@ -246,7 +246,7 @@ WindowFactory::present_load_subgraph(SPtr graph, void WindowFactory::present_new_subgraph(SPtr graph, - Node::Properties data) + Properties data) { GraphWindowMap::iterator w = _graph_windows.find(graph->path()); diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp index d527c0ad..6754dce4 100644 --- a/src/gui/WindowFactory.hpp +++ b/src/gui/WindowFactory.hpp @@ -64,8 +64,6 @@ public: GraphWindow* preferred = NULL, SPtr view = SPtr()); - typedef Node::Properties Properties; - void present_load_plugin(SPtr graph, Properties data=Properties()); void present_load_graph(SPtr graph, Properties data=Properties()); void present_load_subgraph(SPtr graph, Properties data=Properties()); diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index a4aa47fb..1f950089 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -143,10 +143,9 @@ instantiate(const LV2UI_Descriptor* descriptor, *ui->client.get())); // Create empty root graph model - Ingen::Resource::Properties props; + Ingen::Properties props; props.insert(std::make_pair(ui->app->uris().rdf_type, - Ingen::Resource::Property( - ui->app->uris().ingen_Graph))); + Ingen::Property(ui->app->uris().ingen_Graph))); ui->app->store()->put(Ingen::main_uri(), props); // Create a GraphBox for the root and set as the UI widget diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp index 9efb9c30..2d184559 100644 --- a/src/server/Broadcaster.hpp +++ b/src/server/Broadcaster.hpp @@ -99,15 +99,15 @@ public: void bundle_begin() { BROADCAST(bundle_begin); } void bundle_end() { BROADCAST(bundle_end); } - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::Graph::DEFAULT) { + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) { BROADCAST(put, uri, properties); } - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) { + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { BROADCAST(delta, uri, remove, add); } diff --git a/src/server/ClientUpdate.cpp b/src/server/ClientUpdate.cpp index 217d3a32..e4d9c08f 100644 --- a/src/server/ClientUpdate.cpp +++ b/src/server/ClientUpdate.cpp @@ -27,9 +27,9 @@ namespace Ingen { namespace Server { void -ClientUpdate::put(const Raul::URI& uri, - const Resource::Properties& props, - Resource::Graph ctx) +ClientUpdate::put(const Raul::URI& uri, + const Properties& props, + Resource::Graph ctx) { const ClientUpdate::Put put = { uri, props, ctx }; puts.push_back(put); @@ -40,7 +40,7 @@ ClientUpdate::put_port(const PortImpl* port) { const URIs& uris = port->bufs().uris(); if (port->is_a(PortType::CONTROL) || port->is_a(PortType::CV)) { - Resource::Properties props = port->properties(); + Properties props = port->properties(); props.erase(uris.ingen_value); props.insert(std::make_pair(uris.ingen_value, port->value())); put(port->uri(), props); @@ -110,7 +110,7 @@ ClientUpdate::put_preset(const URIs& uris, const Raul::URI& preset, const std::string& label) { - Resource::Properties props{ + const Properties props{ { uris.rdf_type, uris.pset_Preset.urid }, { uris.rdfs_label, uris.forge.alloc(label) }, { uris.lv2_appliesTo, uris.forge.make_urid(plugin) }}; diff --git a/src/server/ClientUpdate.hpp b/src/server/ClientUpdate.hpp index dcdcc132..ea11c2b8 100644 --- a/src/server/ClientUpdate.hpp +++ b/src/server/ClientUpdate.hpp @@ -42,9 +42,9 @@ class PluginImpl; * post_process() to avoid the need to lock. */ struct ClientUpdate { - void put(const Raul::URI& uri, - const Resource::Properties& props, - Resource::Graph ctx=Resource::Graph::DEFAULT); + void put(const Raul::URI& uri, + const Properties& props, + Resource::Graph ctx = Resource::Graph::DEFAULT); void put_port(const PortImpl* port); void put_block(const BlockImpl* block); @@ -60,9 +60,9 @@ struct ClientUpdate { void send(Interface* dest); struct Put { - Raul::URI uri; - Resource::Properties properties; - Resource::Graph ctx; + Raul::URI uri; + Properties properties; + Resource::Graph ctx; }; struct Connect { diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index 0fa11a72..e1ef6b26 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -93,9 +93,9 @@ DuplexPort::duplicate(Engine& engine, } void -DuplexPort::inherit_neighbour(const PortImpl* port, - Resource::Properties& remove, - Resource::Properties& add) +DuplexPort::inherit_neighbour(const PortImpl* port, + Properties& remove, + Properties& add) { const URIs& uris = _bufs.uris(); @@ -113,7 +113,7 @@ DuplexPort::inherit_neighbour(const PortImpl* port, add.insert(std::make_pair(uris.lv2_maximum, port->maximum())); } } else if (_type == PortType::ATOM) { - for (Resource::Properties::const_iterator i = port->properties().find( + for (Properties::const_iterator i = port->properties().find( uris.atom_supports); i != port->properties().end() && i->first == uris.atom_supports; ++i) { diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp index 47c24b9e..adec2bef 100644 --- a/src/server/DuplexPort.hpp +++ b/src/server/DuplexPort.hpp @@ -57,9 +57,9 @@ public: const Raul::Symbol& symbol, GraphImpl* parent); - void inherit_neighbour(const PortImpl* port, - Resource::Properties& remove, - Resource::Properties& add); + void inherit_neighbour(const PortImpl* port, + Properties& remove, + Properties& add); void on_property(const Raul::URI& uri, const Atom& value); diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index d12f474c..794088bc 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -374,14 +374,14 @@ Engine::activate() if (!_root_graph) { // Create root graph - Resource::Properties graph_properties; + Properties graph_properties; graph_properties.insert( make_pair(uris.rdf_type, - Resource::Property(uris.ingen_Graph))); + Property(uris.ingen_Graph))); graph_properties.insert( make_pair(uris.ingen_polyphony, - Resource::Property(_world->forge().make(1), - Resource::Graph::INTERNAL))); + Property(_world->forge().make(1), + Resource::Graph::INTERNAL))); Events::CreateGraph ev( *this, SPtr(), -1, 0, Raul::Path("/"), graph_properties); diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp index 5aecf2db..1cd573b2 100644 --- a/src/server/EventWriter.cpp +++ b/src/server/EventWriter.cpp @@ -67,9 +67,9 @@ EventWriter::bundle_end() } void -EventWriter::put(const Raul::URI& uri, - const Resource::Properties& properties, - const Resource::Graph ctx) +EventWriter::put(const Raul::URI& uri, + const Properties& properties, + const Resource::Graph ctx) { _engine.enqueue_event( new Events::Delta(_engine, _respondee, _request_id, now(), @@ -78,9 +78,9 @@ EventWriter::put(const Raul::URI& uri, } void -EventWriter::delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) +EventWriter::delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) { _engine.enqueue_event( new Events::Delta(_engine, _respondee, _request_id, now(), diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp index 5e05af0c..32e3b249 100644 --- a/src/server/EventWriter.hpp +++ b/src/server/EventWriter.hpp @@ -57,13 +57,13 @@ public: virtual void bundle_end(); - virtual void put(const Raul::URI& path, - const Resource::Properties& properties, - const Resource::Graph g=Resource::Graph::DEFAULT); + virtual void put(const Raul::URI& path, + const Properties& properties, + const Resource::Graph g = Resource::Graph::DEFAULT); - virtual void delta(const Raul::URI& path, - const Resource::Properties& remove, - const Resource::Properties& add); + virtual void delta(const Raul::URI& path, + const Properties& remove, + const Properties& add); virtual void copy(const Raul::URI& old_uri, const Raul::URI& new_uri); diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp index c95f3c5e..4a027558 100644 --- a/src/server/NodeImpl.cpp +++ b/src/server/NodeImpl.cpp @@ -38,7 +38,7 @@ NodeImpl::get_property(const Raul::URI& key) const { ThreadManager::assert_not_thread(THREAD_PROCESS); static const Atom null_atom; - Resource::Properties::const_iterator i = properties().find(key); + Properties::const_iterator i = properties().find(key); return (i != properties().end()) ? i->second : null_atom; } diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index e195de9d..27b3db2f 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -186,9 +186,9 @@ public: This is used for Graph ports, so e.g. a control input has the range of all the ports it is connected to. */ - virtual void inherit_neighbour(const PortImpl* port, - Resource::Properties& remove, - Resource::Properties& add) {} + virtual void inherit_neighbour(const PortImpl* port, + Properties& remove, + Properties& add) {} virtual void connect_buffers(SampleCount offset=0); virtual void recycle_buffers(); diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp index 8e7a5030..78c0befa 100644 --- a/src/server/events/Connect.hpp +++ b/src/server/events/Connect.hpp @@ -64,10 +64,10 @@ private: MPtr _compiled_graph; SPtr _arc; MPtr _voices; - Resource::Properties _tail_remove; - Resource::Properties _tail_add; - Resource::Properties _head_remove; - Resource::Properties _head_add; + Properties _tail_remove; + Properties _tail_add; + Properties _head_remove; + Properties _head_add; }; } // namespace Events diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index db561e1c..0b4cbae3 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -35,12 +35,12 @@ namespace Ingen { namespace Server { namespace Events { -CreateBlock::CreateBlock(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - Resource::Properties& properties) +CreateBlock::CreateBlock(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + Properties& properties) : Event(engine, client, id, timestamp) , _path(path) , _properties(properties) @@ -55,7 +55,7 @@ CreateBlock::~CreateBlock() bool CreateBlock::pre_process(PreProcessContext& ctx) { - typedef Resource::Properties::const_iterator iterator; + typedef Properties::const_iterator iterator; const Ingen::URIs& uris = _engine.world()->uris(); const SPtr store = _engine.store(); @@ -121,7 +121,7 @@ CreateBlock::pre_process(PreProcessContext& ctx) // Load state from directory if given in properties LilvState* state = NULL; - Resource::Properties::iterator s = _properties.find(uris.state_state); + Properties::iterator s = _properties.find(uris.state_state); if (s != _properties.end() && s->second.type() == uris.forge.Path) { state = LV2Block::load_state(_engine.world(), s->second.ptr()); } diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp index 047c01f3..7ffd9931 100644 --- a/src/server/events/CreateBlock.hpp +++ b/src/server/events/CreateBlock.hpp @@ -38,12 +38,12 @@ namespace Events { class CreateBlock : public Event { public: - CreateBlock(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& block_path, - Resource::Properties& properties); + CreateBlock(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& block_path, + Properties& properties); ~CreateBlock(); @@ -53,12 +53,12 @@ public: void undo(Interface& target); private: - Raul::Path _path; - Resource::Properties& _properties; - ClientUpdate _update; - GraphImpl* _graph; - BlockImpl* _block; - MPtr _compiled_graph; + Raul::Path _path; + Properties& _properties; + ClientUpdate _update; + GraphImpl* _graph; + BlockImpl* _block; + MPtr _compiled_graph; }; } // namespace Events diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index 1fff9f95..891ca33c 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -31,12 +31,12 @@ namespace Ingen { namespace Server { namespace Events { -CreateGraph::CreateGraph(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - const Resource::Properties& properties) +CreateGraph::CreateGraph(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + const Properties& properties) : Event(engine, client, id, timestamp) , _path(path) , _properties(properties) @@ -57,7 +57,7 @@ CreateGraph::build_child_events() const Ingen::URIs& uris = _engine.world()->uris(); // Properties common to both ports - Resource::Properties control_properties; + Properties control_properties; control_properties.put(uris.atom_bufferType, uris.atom_Sequence); control_properties.put(uris.atom_supports, uris.patch_Message); control_properties.put(uris.lv2_designation, uris.lv2_control); @@ -66,7 +66,7 @@ CreateGraph::build_child_events() control_properties.put(uris.rsz_minimumSize, uris.forge.make(4096)); // Add control port (message receive) - Resource::Properties in_properties(control_properties); + Properties in_properties(control_properties); in_properties.put(uris.lv2_index, uris.forge.make(0)); in_properties.put(uris.lv2_name, uris.forge.alloc("Control")); in_properties.put(uris.rdf_type, uris.lv2_InputPort); @@ -82,7 +82,7 @@ CreateGraph::build_child_events() in_properties)); // Add notify port (message respond) - Resource::Properties out_properties(control_properties); + Properties out_properties(control_properties); out_properties.put(uris.lv2_index, uris.forge.make(1)); out_properties.put(uris.lv2_name, uris.forge.alloc("Notify")); out_properties.put(uris.rdf_type, uris.lv2_OutputPort); @@ -113,7 +113,7 @@ CreateGraph::pre_process(PreProcessContext& ctx) const Ingen::URIs& uris = _engine.world()->uris(); - typedef Resource::Properties::const_iterator iterator; + typedef Properties::const_iterator iterator; uint32_t ext_poly = 1; uint32_t int_poly = 1; @@ -158,8 +158,8 @@ CreateGraph::pre_process(PreProcessContext& ctx) _engine.driver()->sample_rate(), int_poly); _graph->add_property(uris.rdf_type, uris.ingen_Graph.urid); _graph->add_property(uris.rdf_type, - Resource::Property(uris.ingen_Block, - Resource::Graph::EXTERNAL)); + Property(uris.ingen_Block, + Resource::Graph::EXTERNAL)); } _graph->set_properties(_properties); diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp index 896a18f9..9b4124e4 100644 --- a/src/server/events/CreateGraph.hpp +++ b/src/server/events/CreateGraph.hpp @@ -37,12 +37,12 @@ namespace Events { class CreateGraph : public Event { public: - CreateGraph(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - const Resource::Properties& properties); + CreateGraph(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + const Properties& properties); ~CreateGraph(); @@ -56,13 +56,13 @@ public: private: void build_child_events(); - const Raul::Path _path; - Resource::Properties _properties; - ClientUpdate _update; - GraphImpl* _graph; - GraphImpl* _parent; - MPtr _compiled_graph; - std::list _child_events; + const Raul::Path _path; + Properties _properties; + ClientUpdate _update; + GraphImpl* _graph; + GraphImpl* _parent; + MPtr _compiled_graph; + std::list _child_events; }; } // namespace Events diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 63301efd..4e34762a 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -36,12 +36,12 @@ namespace Ingen { namespace Server { namespace Events { -CreatePort::CreatePort(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - const Resource::Properties& properties) +CreatePort::CreatePort(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + const Properties& properties) : Event(engine, client, id, timestamp) , _path(path) , _port_type(PortType::UNKNOWN) @@ -53,8 +53,8 @@ CreatePort::CreatePort(Engine& engine, { const Ingen::URIs& uris = _engine.world()->uris(); - typedef Resource::Properties::const_iterator Iterator; - typedef std::pair Range; + typedef Properties::const_iterator Iterator; + typedef std::pair Range; const Range types = properties.equal_range(uris.rdf_type); for (Iterator i = types.first; i != types.second; ++i) { @@ -109,7 +109,7 @@ CreatePort::pre_process(PreProcessContext& ctx) const uint32_t buf_size = bufs.default_size(_buf_type); const int32_t old_n_ports = _graph->num_ports_non_rt(); - typedef Resource::Properties::const_iterator PropIter; + typedef Properties::const_iterator PropIter; PropIter index_i = _properties.find(uris.lv2_index); if (index_i == _properties.end()) { diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp index 2d32f1dd..a2ea7682 100644 --- a/src/server/events/CreatePort.hpp +++ b/src/server/events/CreatePort.hpp @@ -45,12 +45,12 @@ namespace Events { class CreatePort : public Event { public: - CreatePort(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - const Resource::Properties& properties); + CreatePort(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + const Properties& properties); bool pre_process(PreProcessContext& ctx); void execute(RunContext& context); @@ -63,16 +63,16 @@ private: OUTPUT }; - Raul::Path _path; - PortType _port_type; - LV2_URID _buf_type; - GraphImpl* _graph; - DuplexPort* _graph_port; - MPtr _ports_array; ///< New external port array for Graph - EnginePort* _engine_port; ///< Driver port if on the root - Resource::Properties _properties; - Resource::Properties _update; - boost::optional _flow; + Raul::Path _path; + PortType _port_type; + LV2_URID _buf_type; + GraphImpl* _graph; + DuplexPort* _graph_port; + MPtr _ports_array; ///< New external port array for Graph + EnginePort* _engine_port; ///< Driver port if on the root + Properties _properties; + Properties _update; + boost::optional _flow; }; } // namespace Events diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 0398face..9f4c1da2 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -42,8 +42,6 @@ namespace Ingen { namespace Server { namespace Events { -typedef Resource::Properties Properties; - Delta::Delta(Engine& engine, SPtr client, int32_t id, @@ -276,9 +274,9 @@ Delta::pre_process(PreProcessContext& ctx) } for (const auto& p : _properties) { - const Raul::URI& key = p.first; - const Resource::Property& value = p.second; - SpecialType op = SpecialType::NONE; + const Raul::URI& key = p.first; + const Property& value = p.second; + SpecialType op = SpecialType::NONE; if (obj) { Resource& resource = *obj; if (value != uris.patch_wildcard) { diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp index d751afc7..842986a9 100644 --- a/src/server/events/Delta.hpp +++ b/src/server/events/Delta.hpp @@ -56,15 +56,15 @@ public: PATCH }; - Delta(Engine& engine, - SPtr client, - int32_t id, - SampleCount timestamp, - Type type, - Resource::Graph context, - const Raul::URI& subject, - const Resource::Properties& properties, - const Resource::Properties& remove = Resource::Properties()); + Delta(Engine& engine, + SPtr client, + int32_t id, + SampleCount timestamp, + Type type, + Resource::Graph context, + const Raul::URI& subject, + const Properties& properties, + const Properties& remove = Properties()); ~Delta(); @@ -99,8 +99,8 @@ private: std::vector _types; std::vector _remove_types; Raul::URI _subject; - Resource::Properties _properties; - Resource::Properties _remove; + Properties _properties; + Properties _remove; ClientUpdate _update; Ingen::Resource* _object; GraphImpl* _graph; @@ -110,8 +110,8 @@ private: Resource::Graph _context; Type _type; - Resource::Properties _added; - Resource::Properties _removed; + Properties _added; + Properties _removed; std::vector _removed_bindings; diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 97156ff9..1ac2e383 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -42,6 +42,7 @@ #include "ingen/EngineBase.hpp" #include "ingen/Interface.hpp" #include "ingen/Parser.hpp" +#include "ingen/Properties.hpp" #include "ingen/Serialiser.hpp" #include "ingen/Store.hpp" #include "ingen/URIMap.hpp" @@ -67,13 +68,13 @@ public: void bundle_end() {} - void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx = Resource::Graph::DEFAULT) {} + void put(const Raul::URI& uri, + const Properties& properties, + Resource::Graph ctx = Resource::Graph::DEFAULT) {} - void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) {} + void delta(const Raul::URI& uri, + const Properties& remove, + const Properties& add) {} void copy(const Raul::URI& old_uri, const Raul::URI& new_uri) {} -- cgit v1.2.1