From a6fb6a0289ea47692d87f3e0200532a426f8e60d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 28 Jul 2008 21:56:03 +0000 Subject: Simply global memory management crap by using shared_ptr in the World struct (it's not C anyway, might as well). Properly support LV2 events from plugin UIs over OSC and directly (w/ monolithic UI/engine). Fix crashes on node destruction with monolithic UI/engine. Resolves ticket #177. git-svn-id: http://svn.drobilla.net/lad/ingen@1293 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/shared/LV2URIMap.hpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/libs/shared/LV2URIMap.hpp') diff --git a/src/libs/shared/LV2URIMap.hpp b/src/libs/shared/LV2URIMap.hpp index 0c947560..35130066 100644 --- a/src/libs/shared/LV2URIMap.hpp +++ b/src/libs/shared/LV2URIMap.hpp @@ -25,6 +25,7 @@ #include #include +#include #include #include "common/lv2ext/lv2_uri_map.h" @@ -32,22 +33,28 @@ namespace Ingen { namespace Shared { -/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features). +/** Implementation of the LV2 URI Map extension */ -class LV2URIMap { +class LV2URIMap : public boost::noncopyable { public: LV2URIMap(); + + LV2_Feature* feature() { return &uri_map_feature; } + + uint32_t uri_to_id(const char* map, + const char* uri); +private: typedef std::map URIMap; + static uint32_t uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data, + const char* map, + const char* uri); + LV2_Feature uri_map_feature; LV2_URI_Map_Feature uri_map_feature_data; URIMap uri_map; uint32_t next_uri_id; - - static uint32_t uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data, - const char* map, - const char* uri); }; -- cgit v1.2.1