diff options
author | David Robillard <d@drobilla.net> | 2017-03-26 20:04:59 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-26 20:04:59 +0200 |
commit | 5df29e8cc91115098dcb09978722c76b71689fa3 (patch) | |
tree | 12d807052d9ab41fe6ebc547c5556b492f0c8e97 /src | |
parent | ff5fb176daad42b2727b02885f9a4407b694ba52 (diff) | |
download | ingen-5df29e8cc91115098dcb09978722c76b71689fa3.tar.gz ingen-5df29e8cc91115098dcb09978722c76b71689fa3.tar.bz2 ingen-5df29e8cc91115098dcb09978722c76b71689fa3.zip |
Remove Node::path() and Node::symbol()
Diffstat (limited to 'src')
-rw-r--r-- | src/Log.cpp | 6 | ||||
-rw-r--r-- | src/Serialiser.cpp | 13 | ||||
-rw-r--r-- | src/gui/GraphCanvas.cpp | 5 | ||||
-rw-r--r-- | src/server/events/DisconnectAll.cpp | 2 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 3 |
5 files changed, 18 insertions, 11 deletions
diff --git a/src/Log.cpp b/src/Log.cpp index 259d9a3e..e5f4abc3 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -117,7 +117,11 @@ log_vprintf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, va_list args) Log::Feature::Handle* f = (Log::Feature::Handle*)handle; va_list noargs; - int ret = f->log->vtprintf(type, f->node->path().c_str(), noargs); + const std::string tag = (uri_is_path(f->node->uri()) + ? std::string(uri_to_path(f->node->uri())) + : std::string(f->node->uri())); + + int ret = f->log->vtprintf(type, tag.c_str(), noargs); ret += f->log->vtprintf(type, ": ", noargs); ret += f->log->vtprintf(type, fmt, args); diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index d3d43e8c..b51b7d34 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -211,7 +211,7 @@ Serialiser::Impl::write_bundle(SPtr<const Node> graph, const string main_file = Glib::build_filename(path, "main.ttl"); const Raul::Path old_root_path = _root_path; - start_to_file(graph->path(), main_file); + start_to_file(uri_to_path(graph->uri()), main_file); std::set<const Resource*> plugins = serialise_graph( graph, Sord::URI(_model->world(), main_file, _base_uri)); @@ -304,13 +304,13 @@ Serialiser::Impl::path_rdf_node(const Raul::Path& path) const Sord::Node Serialiser::Impl::rdf_node(const SPtr<const Node> node) const { - return path_rdf_node(node->path()); + return path_rdf_node(uri_to_path(node->uri())); } Raul::Symbol Serialiser::Impl::get_symbol(const SPtr<const Node> node) const { - return node->symbol(); + return Raul::Symbol(uri_to_path(node->uri()).symbol()); } void @@ -375,7 +375,7 @@ Serialiser::Impl::serialise_graph(SPtr<const Node> graph, for (Store::const_iterator n = _world.store()->find_first_child(graph); n != _world.store()->end() && n->first.is_child_of(graph->uri()); ++n) { - if (uri_to_path(n->first).parent() != graph->path()) { + if (uri_to_path(n->first).parent() != uri_to_path(graph->uri())) { continue; } @@ -385,7 +385,8 @@ Serialiser::Impl::serialise_graph(SPtr<const Node> graph, SerdURI base_uri; serd_uri_parse((const uint8_t*)_base_uri.c_str(), &base_uri); - const string sub_bundle_path = subgraph->path().substr(1) + ".ingen"; + const Raul::Path sub_path = uri_to_path(subgraph->uri()); + const string sub_bundle_path = sub_path.substr(1) + ".ingen"; SerdURI subgraph_uri; SerdNode subgraph_node = serd_node_new_uri_from_string( @@ -486,7 +487,7 @@ Serialiser::Impl::serialise_block(SPtr<const Node> block, for (Store::const_iterator n = _world.store()->find_first_child(block); n != _world.store()->end() && n->first.is_child_of(block->uri()); ++n) { - if (uri_to_path(n->first).parent() != block->path()) { + if (uri_to_path(n->first).parent() != uri_to_path(block->uri())) { continue; } diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index fa5ed149..73253ae0 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -730,9 +730,10 @@ GraphCanvas::paste() } const SPtr<Node> node = c.second; - const Raul::Path& old_path = copy_root.child(node->path()); + const Raul::Path& old_path = copy_root.child(uri_to_path(node->uri())); const Raul::URI& old_uri = path_to_uri(old_path); - const Raul::Path& new_path = avoider.map_path(parent.child(node->path())); + const Raul::Path& new_path = avoider.map_path( + parent.child(uri_to_path(node->uri()))); Properties props{{uris.lv2_prototype, _app.forge().make_urid(old_uri)}}; diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index 4d5a0958..a9ab7521 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -60,7 +60,7 @@ DisconnectAll::DisconnectAll(Engine& engine, Node* object) : Event(engine) , _parent_path(parent->path()) - , _path(object->path()) + , _path(uri_to_path(object->uri())) , _parent(parent) , _block(dynamic_cast<BlockImpl*>(object)) , _port(dynamic_cast<PortImpl*>(object)) diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index b3489d6d..6d3b62c1 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -705,7 +705,8 @@ ingen_save(LV2_Handle instance, { std::lock_guard<std::mutex> lock(plugin->world->rdf_mutex()); - plugin->world->serialiser()->start_to_file(root->second->path(), real_path); + plugin->world->serialiser()->start_to_file( + uri_to_path(root->second->uri()), real_path); plugin->world->serialiser()->serialise(root->second); plugin->world->serialiser()->finish(); } |