26 #ifndef LVTK_INSTANCE_ACCESS_HPP 27 #define LVTK_INSTANCE_ACCESS_HPP 29 #include <lv2/lv2plug.in/ns/ext/instance-access/instance-access.h> 31 #include <lvtk/private/types.hpp> 41 template<
bool Required = true>
44 template<
class Derived>
45 struct I : Extension<Required>
49 p_plugin_instance(NULL)
57 hmap[LV2_INSTANCE_ACCESS_URI] =
63 handle_feature(LV2UI_Handle instance,
FeatureData data)
65 Derived* derived =
reinterpret_cast<Derived*
>(instance);
68 mixin->p_plugin_instance =
reinterpret_cast<LV2_Handle
>(data);
69 mixin->m_ok = (mixin->p_plugin_instance != NULL);
80 std::clog <<
" [InstanceAccess] Validation " 81 << (this->m_ok ?
"succeeded" :
"failed")
95 return p_plugin_instance;
100 LV2_Handle p_plugin_instance;
void * FeatureData
Definition: feature.hpp:47
Definition: instance_access.hpp:45
Definition: feature.hpp:34
Definition: instance_access.hpp:42
LV2_Handle get_instance()
Definition: instance_access.hpp:93
map< string, FeatureHandler > FeatureHandlerMap
Definition: feature.hpp:57