From 7be6d5d05756a7dea20c494d56f364b4dc064c88 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 May 2012 03:01:26 +0000 Subject: Clean up and better document World interface. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4344 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 26 +++++++++++++------------- src/client/PluginUI.cpp | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/client') diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index a1da01c4..042cba57 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -37,7 +37,7 @@ using namespace Shared; namespace Client { -ClientStore::ClientStore(SharedPtr uris, +ClientStore::ClientStore(Shared::URIs& uris, SharedPtr engine, SharedPtr emitter) : _uris(uris) @@ -273,7 +273,7 @@ ClientStore::put(const Raul::URI& uri, #ifdef INGEN_CLIENT_STORE_DUMP LOG(Raul::info) << "PUT " << uri << " {" << endl; for (Iterator i = properties.begin(); i != properties.end(); ++i) - LOG(Raul::info) << '\t' << i->first << " = " << _uris->forge.str(i->second) + LOG(Raul::info) << '\t' << i->first << " = " << _uris.forge.str(i->second) << " :: " << i->second.type() << endl; LOG(Raul::info) << "}" << endl; #endif @@ -283,8 +283,8 @@ ClientStore::put(const Raul::URI& uri, is_patch, is_node, is_port, is_output); // Check if uri is a plugin - Iterator t = properties.find(_uris->rdf_type); - if (t != properties.end() && t->second.type() == _uris->forge.URI) { + Iterator t = properties.find(_uris.rdf_type); + if (t != properties.end() && t->second.type() == _uris.forge.URI) { const Raul::Atom& type = t->second; const Raul::URI& type_uri = type.get_uri(); const Plugin::Type plugin_type = Plugin::type_from_uri(type_uri); @@ -320,16 +320,16 @@ ClientStore::put(const Raul::URI& uri, model->set_properties(properties); add_object(model); } else if (is_node) { - const Iterator p = properties.find(_uris->ingen_prototype); + const Iterator p = properties.find(_uris.ingen_prototype); SharedPtr plug; - if (p->second.is_valid() && p->second.type() == _uris->forge.URI) { + if (p->second.is_valid() && p->second.type() == _uris.forge.URI) { if (!(plug = _plugin(p->second.get_uri()))) { LOG(Raul::warn)(Raul::fmt("Unable to find plugin <%1%>\n") % p->second.get_uri()); plug = SharedPtr( new PluginModel(uris(), p->second.get_uri(), - _uris->ingen_nil, + _uris.ingen_nil, Resource::Properties())); add_plugin(plug); } @@ -344,8 +344,8 @@ ClientStore::put(const Raul::URI& uri, PortModel::Direction pdir = (is_output) ? PortModel::OUTPUT : PortModel::INPUT; - const Iterator i = properties.find(_uris->lv2_index); - if (i != properties.end() && i->second.type() == _uris->forge.Int) { + const Iterator i = properties.find(_uris.lv2_index); + if (i != properties.end() && i->second.type() == _uris.forge.Int) { const uint32_t index = i->second.get_int32(); SharedPtr p( new PortModel(uris(), path, index, pdir)); @@ -370,11 +370,11 @@ ClientStore::delta(const Raul::URI& uri, LOG(Raul::info) << "DELTA " << uri << " {" << endl; for (iterator i = remove.begin(); i != remove.end(); ++i) LOG(Raul::info) << " - " << i->first - << " = " << _uris->forge.str(i->second) + << " = " << _uris.forge.str(i->second) << " :: " << i->second.type() << endl; for (iterator i = add.begin(); i != add.end(); ++i) LOG(Raul::info) << " + " << i->first - << " = " << _uris->forge.str(i->second) + << " = " << _uris.forge.str(i->second) << " :: " << i->second.type() << endl; LOG(Raul::info) << "}" << endl; #endif @@ -400,9 +400,9 @@ ClientStore::set_property(const Raul::URI& subject_uri, const Raul::URI& predicate, const Raul::Atom& value) { - if (subject_uri == _uris->ingen_engine) { + if (subject_uri == _uris.ingen_engine) { LOG(Raul::info)(Raul::fmt("Engine property <%1%> = %2%\n") - % predicate % _uris->forge.str(value)); + % predicate % _uris.forge.str(value)); return; } SharedPtr subject = _resource(subject_uri); diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 5cdf5ab2..0c597490 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -48,7 +48,7 @@ lv2_ui_write(SuilController controller, SharedPtr port = ports[port_index]; - const Shared::URIs& uris = *ui->world()->uris().get(); + const Shared::URIs& uris = ui->world()->uris(); // float (special case, always 0) if (format == 0) { @@ -125,7 +125,7 @@ PluginUI::create(Ingen::Shared::World* world, } SharedPtr ret(new PluginUI(world, node, lilv_ui_get_uri(ui))); - ret->_features = world->lv2_features()->lv2_features( + ret->_features = world->lv2_features().lv2_features( world, const_cast(node.get())); SuilInstance* instance = suil_instance_new( -- cgit v1.2.1