25 #ifndef LVTK_OPTIONS_HPP 26 #define LVTK_OPTIONS_HPP 28 #include <lv2/lv2plug.in/ns/ext/options/options.h> 31 #ifndef LVTK_OPTIONS_IFACE 32 #define LVTK_OPTIONS_IFACE 1 86 : index (0),m_size (0), p_opts (options)
96 if (p_opts == 0 || (p_opts[index].key == 0 &&
97 p_opts[index].value == 0))
100 return &p_opts[index++];
104 uint32_t
size()
const {
return m_size; }
115 const Option* p_opts;
129 template <
bool Required = false>
133 template <
class Derived>
134 struct I : Extension<Required>
138 I() : p_supplied_opts (0) { }
151 Derived* plugin (reinterpret_cast<Derived*> (instance));
153 mixin->p_supplied_opts = (Option*) data;
162 std::clog <<
" [Options] validation " 163 <<(this->m_ok ?
"succeeded" :
"failed")<<
"."<<std::endl;
172 #if LVTK_OPTIONS_IFACE 173 if (! strcmp (uri, LV2_OPTIONS__interface)) {
223 Option* p_supplied_opts;
227 static uint32_t _get (LV2_Handle handle, LV2_Options_Option* options)
229 Derived* plugin (reinterpret_cast<Derived*> (handle));
230 return plugin->get_options (options);
233 static uint32_t _set (LV2_Handle handle,
const LV2_Options_Option* options)
235 Derived* plugin (reinterpret_cast<Derived*> (handle));
236 return plugin->set_options (options);
uint32_t get_options(Option *)
Definition: options.hpp:201
uint32_t size() const
Definition: options.hpp:104
Definition: options.hpp:67
Definition: options.hpp:45
void * FeatureData
Definition: feature.hpp:47
const Option * next()
Definition: options.hpp:94
Definition: options.hpp:81
static void map_feature_handlers(FeatureHandlerMap &hmap)
Definition: options.hpp:142
Definition: options.hpp:57
Definition: options.hpp:49
static const void * extension_data(const char *uri)
Definition: options.hpp:170
Definition: feature.hpp:34
const Option * get_supplied_options()
Definition: options.hpp:187
Definition: options.hpp:130
Definition: options.hpp:134
uint32_t set_options(const Option *)
Definition: options.hpp:215
LV2_Options_Option Option
Definition: options.hpp:39
Definition: options.hpp:64
Definition: options.hpp:66
OptionsContext
Definition: options.hpp:42
OptionsStatus
Definition: options.hpp:62
I()
Definition: options.hpp:138
Definition: options.hpp:65
Definition: options.hpp:53
map< string, FeatureHandler > FeatureHandlerMap
Definition: feature.hpp:57
Definition: options.hpp:63