23 #ifndef LVTK_LV2_URID_HPP
24 #define LVTK_LV2_URID_HPP
26 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
31 typedef uint32_t (*
MapFunc)(
const char* symbol);
34 typedef const char* (*UnmapFunc)(uint32_t id);
42 template<
bool Required = true>
45 template<
class Derived>
46 struct I : Extension<Required>
48 I() : p_unmap(NULL), p_map(NULL) { }
60 handle_map_feature (
void* instance,
void* data)
62 Derived* d =
reinterpret_cast<Derived*
>(instance);
65 mixin->p_map =
reinterpret_cast<LV2_URID_Map*
>(data);
71 handle_unmap_feature (
void* instance,
void* data)
73 Derived* d =
reinterpret_cast<Derived*
>(instance);
77 reinterpret_cast<LV2_URID_Unmap*
>(data);
86 std::clog <<
" [URID] Validation "
87 << (this->m_ok ?
"succeeded" :
"failed")
113 return p_unmap->unmap(p_unmap->handle, urid);
141 return p_map->map(p_map->handle, uri);
148 LV2_URID_Unmap *p_unmap;