summaryrefslogtreecommitdiffstats
path: root/src/shared/LV2URIMap.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit059f20c9666234f2be01498ee04f1e7ee795ba8f (patch)
treeef0d53073d53012aeaa7d084fccf477b166c0684 /src/shared/LV2URIMap.cpp
parent085a451dfec54126be1b9346899c81d82e6eb58e (diff)
downloadingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip
Save Ingen patches as working standard LV2 plugin bundles.
This allows you to create an Ingen patch in Ingen running as a Jack client, save it, then load that patch as an LV2 plugin in any LV2 compliant host. Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process). More API/ABI stable interface for Ingen::Shared::World. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2533 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared/LV2URIMap.cpp')
-rw-r--r--src/shared/LV2URIMap.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/shared/LV2URIMap.cpp b/src/shared/LV2URIMap.cpp
index d8114014..e069a644 100644
--- a/src/shared/LV2URIMap.cpp
+++ b/src/shared/LV2URIMap.cpp
@@ -19,11 +19,10 @@
#include <cassert>
#include <stdint.h>
#include <glib.h>
+#include <boost/shared_ptr.hpp>
#include "raul/log.hpp"
#include "object.lv2/object.h"
#include "LV2URIMap.hpp"
-#include "module/ingen_module.hpp"
-#include "module/World.hpp"
using namespace std;
using namespace Raul;
@@ -38,6 +37,12 @@ LV2URIMap::Quark::Quark(const char* c_str)
{
}
+const char*
+LV2URIMap::Quark::c_str() const
+{
+ return g_quark_to_string(id);
+}
+
#define NS_CTX "http://lv2plug.in/ns/dev/contexts#"
#define NS_INGEN "http://drobilla.net/ns/ingen#"
#define NS_INGENUI "http://drobilla.net/ns/ingenuity#"
@@ -114,23 +119,14 @@ LV2URIMap::LV2URIMap()
}
-const LV2URIMap&
-LV2URIMap::instance()
-{
- return *ingen_get_world()->uris;
-}
+struct null_deleter { void operator()(void const *) const {} };
uint32_t
LV2URIMap::uri_to_id(const char* map,
const char* uri)
{
- const uint32_t ret = static_cast<uint32_t>(g_quark_from_string(uri));
- debug << "[LV2URIMap] ";
- if (map)
- debug << map << " : ";
- debug << uri << " => " << ret << endl;
- return ret;
+ return static_cast<uint32_t>(g_quark_from_string(uri));
}