summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Plugin.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-12 15:56:21 +0000
committerDavid Robillard <d@drobilla.net>2012-08-12 15:56:21 +0000
commit21b1e2e485d9fa954ca742965d000f3273fcb862 (patch)
tree8f316c5adbf6d387d64ee895b862dae21614524a /src/server/LV2Plugin.cpp
parent65a81eec8943dc0504b8b8755f9866ee4993372c (diff)
downloadingen-21b1e2e485d9fa954ca742965d000f3273fcb862.tar.gz
ingen-21b1e2e485d9fa954ca742965d000f3273fcb862.tar.bz2
ingen-21b1e2e485d9fa954ca742965d000f3273fcb862.zip
Stricter symbol construction and conversion.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4670 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/LV2Plugin.cpp')
-rw-r--r--src/server/LV2Plugin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index c5fcd6cc..ddd58aca 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -36,35 +36,35 @@ LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri)
set_property(_uris.rdf_type, _uris.lv2_Plugin);
}
-const string
+const Raul::Symbol
LV2Plugin::symbol() const
{
string working = uri().str();
- if (working[working.length()-1] == '/')
- working = working.substr(0, working.length()-1);
+ if (working[working.length() - 1] == '/')
+ working = working.substr(0, working.length() - 1);
while (working.length() > 0) {
size_t last_slash = working.find_last_of("/");
const string symbol = working.substr(last_slash+1);
if ( (symbol[0] >= 'a' && symbol[0] <= 'z')
|| (symbol[0] >= 'A' && symbol[0] <= 'Z') )
- return Raul::Path::nameify(symbol);
+ return Raul::Symbol::symbolify(symbol);
else
working = working.substr(0, last_slash);
}
- return "lv2_symbol";
+ return Raul::Symbol("lv2_symbol");
}
NodeImpl*
-LV2Plugin::instantiate(BufferFactory& bufs,
- const string& name,
- bool polyphonic,
- PatchImpl* parent,
- Engine& engine)
+LV2Plugin::instantiate(BufferFactory& bufs,
+ const Raul::Symbol& symbol,
+ bool polyphonic,
+ PatchImpl* parent,
+ Engine& engine)
{
LV2Node* n = new LV2Node(
- this, name, polyphonic, parent, engine.driver()->sample_rate());
+ this, symbol, polyphonic, parent, engine.driver()->sample_rate());
if (!n->instantiate(bufs)) {
delete n;