summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-14 04:23:23 +0000
committerDavid Robillard <d@drobilla.net>2012-08-14 04:23:23 +0000
commit80fee5c311fdbdeda573ec81f59158a5fc87d0a1 (patch)
tree8e7e5a6c9bda32bbe0ae8e8c9f6ab23e44c7c181 /src/client/ClientStore.cpp
parent058eaf65642268047a984a5c80d54a1f62a85130 (diff)
downloadingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.gz
ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.bz2
ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.zip
Update for latest Raul.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4687 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r--src/client/ClientStore.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 2c20ec14..eeaa5430 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -218,7 +218,7 @@ ClientStore::del(const Raul::URI& uri)
return;
}
- const Raul::Path path(uri.str());
+ const Raul::Path path(GraphObject::uri_to_path(uri));
SharedPtr<ObjectModel> removed = remove_object(path);
removed.reset();
LOG(Raul::debug) << "Removed object " << path
@@ -248,11 +248,12 @@ ClientStore::move(const Raul::Path& old_path, const Raul::Path& new_path)
assert(Raul::Path::descendant_comparator(old_path, child_old_path));
Raul::Path child_new_path;
- if (child_old_path == old_path)
+ if (child_old_path == old_path) {
child_new_path = new_path;
- else
- child_new_path = new_path.base()
- + child_old_path.substr(old_path.length() + 1);
+ } else {
+ child_new_path = Raul::Path(
+ new_path.base() + child_old_path.substr(old_path.length() + 1));
+ }
LOG(Raul::info)(Raul::fmt("Renamed %1% to %2%\n")
% child_old_path.c_str() % child_new_path.c_str());
@@ -284,9 +285,9 @@ ClientStore::put(const Raul::URI& uri,
// Check if uri is a plugin
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);
+ 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));
if (plugin_type == Plugin::Patch) {
is_patch = true;
} else if (plugin_type != Plugin::NIL) {
@@ -323,12 +324,12 @@ ClientStore::put(const Raul::URI& uri,
const Iterator p = properties.find(_uris.ingen_prototype);
SharedPtr<PluginModel> plug;
if (p->second.is_valid() && p->second.type() == _uris.forge.URI) {
- if (!(plug = _plugin(p->second.get_uri()))) {
+ if (!(plug = _plugin(Raul::URI(p->second.get_uri())))) {
LOG(Raul::warn)(Raul::fmt("Unable to find plugin <%1%>\n")
% p->second.get_uri());
plug = SharedPtr<PluginModel>(
new PluginModel(uris(),
- p->second.get_uri(),
+ Raul::URI(p->second.get_uri()),
_uris.ingen_nil,
Resource::Properties()));
add_plugin(plug);