summaryrefslogtreecommitdiffstats
path: root/src/client/PluginModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-03 04:46:56 +0000
committerDavid Robillard <d@drobilla.net>2010-02-03 04:46:56 +0000
commit87597f85c5a69a9accd3ce2ed88f2a006173e885 (patch)
treea3ffa393e9aecbc55dae64bad3bd45ee317e6d26 /src/client/PluginModel.cpp
parenta645d2b8be4d7d31f6eef1649156b166a01e0c31 (diff)
downloadingen-87597f85c5a69a9accd3ce2ed88f2a006173e885.tar.gz
ingen-87597f85c5a69a9accd3ce2ed88f2a006173e885.tar.bz2
ingen-87597f85c5a69a9accd3ce2ed88f2a006173e885.zip
Comprehensive use of cached URIs and more advanced Value (Atom) system.
Atoms (e.g. property values or port values) can now be an Atom::DICT, which maps directly to/from an RDF resource. This is now used to store control bindings as a port property, eliminating the special API. Full interned URIs used everywhere, instead of CURIEs pretending to be URIs. Avoid converting string literals to URIs all over the place. Support for binding MIDI pitch bender and MIDI channel pressure. Saving/restoring of MIDI bindings as a free side-effect of the above. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2409 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/PluginModel.cpp')
-rw-r--r--src/client/PluginModel.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index d740a3c1..43571f08 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -21,7 +21,6 @@
#include "raul/Path.hpp"
#include "raul/Atom.hpp"
#include "ingen-config.h"
-#include "module/ingen_module.hpp"
#include "shared/LV2URIMap.hpp"
#include "PluginModel.hpp"
#include "PatchModel.hpp"
@@ -49,14 +48,15 @@ PluginModel::PluginModel(const URI& uri, const URI& type_uri, const Resource::Pr
Glib::Mutex::Lock lock(_rdf_world->mutex());
assert(_rdf_world);
- add_property("rdf:type", Atom(Atom::URI, this->type_uri()));
+ add_property("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", this->type_uri());
#ifdef HAVE_SLV2
SLV2Value plugin_uri = slv2_value_new_uri(_slv2_world, uri.c_str());
_slv2_plugin = slv2_plugins_get_by_uri(_slv2_plugins, plugin_uri);
slv2_value_free(plugin_uri);
#endif
if (_type == Internal)
- set_property("doap:name", Atom(uri.substr(uri.find_last_of('#') + 1).c_str()));
+ set_property("http://usefulinc.com/ns/doap#name",
+ Atom(uri.substr(uri.find_last_of('#') + 1).c_str()));
}
@@ -69,7 +69,7 @@ PluginModel::get_property(const URI& key) const
return val;
// No lv2:symbol from data or engine, invent one
- if (key == ingen_get_world()->uris->lv2_symbol) {
+ if (key == Shared::LV2URIMap::instance().lv2_symbol) {
const URI& uri = this->uri();
size_t last_slash = uri.find_last_of('/');
size_t last_hash = uri.find_last_of('#');
@@ -92,7 +92,7 @@ PluginModel::get_property(const URI& key) const
else
symbol = uri.str().substr(first_delim + 1, last_delim - first_delim - 1);
}
- set_property("lv2:symbol", symbol);
+ set_property("http://lv2plug.in/ns/lv2core#symbol", symbol);
return get_property(key);
}
@@ -153,7 +153,7 @@ PluginModel::set(SharedPtr<PluginModel> p)
Symbol
PluginModel::default_node_symbol()
{
- const Atom& name_atom = get_property("lv2:symbol");
+ const Atom& name_atom = get_property("http://lv2plug.in/ns/lv2core#symbol");
if (name_atom.is_valid() && name_atom.type() == Atom::STRING)
return Symbol::symbolify(name_atom.get_string());
else
@@ -164,7 +164,7 @@ PluginModel::default_node_symbol()
string
PluginModel::human_name()
{
- const Atom& name_atom = get_property("doap:name");
+ const Atom& name_atom = get_property("http://usefulinc.com/ns/doap#name");
if (name_atom.type() == Atom::STRING)
return name_atom.get_string();
else