25#ifndef LMMS_LV2_OPTIONS_H
26#define LMMS_LV2_OPTIONS_H
28#include "lmmsconfig.h"
33#include <lv2/options/options.h>
34#include <lv2/urid/urid.h>
70 template<
typename Opt,
typename Arg>
72 LV2_Options_Context context = LV2_OPTIONS_INSTANCE,
73 std::uint32_t subject = 0)
77 std::make_shared<Opt>(std::forward<Arg>(value)), context, subject);
94 std::shared_ptr<void> value,
95 LV2_Options_Context context = LV2_OPTIONS_INSTANCE,
96 uint32_t subject = 0);
static class Lv2Manager * getLv2Manager()
Definition Engine.h:85
const Lv2UridCache & uridCache() const
Definition Lv2Manager.h:125
Definition Lv2Options.h:62
void clear()
Definition Lv2Options.cpp:99
std::vector< LV2_Options_Option > m_options
option storage
Definition Lv2Options.h:102
static std::set< LV2_URID > s_supportedOptions
options that are supported by every processor
Definition Lv2Options.h:98
static void supportOption(LV2_URID key)
Mark option as supported.
Definition Lv2Options.cpp:49
const LV2_Options_Option * feature() const
Return the feature.
Definition Lv2Options.h:82
std::map< LV2_URID, std::shared_ptr< void > > m_optionValues
option value storage
Definition Lv2Options.h:104
void createOptionVectors()
Fill m_options and m_optionPointers with all options.
Definition Lv2Options.cpp:58
static bool isOptionSupported(LV2_URID key)
Return if an option is supported by LMMS.
Definition Lv2Options.cpp:41
void initOption(Lv2UridCache::Id key, Arg &&value, LV2_Options_Context context=LV2_OPTIONS_INSTANCE, std::uint32_t subject=0)
Initialize an option.
Definition Lv2Options.h:71
std::map< LV2_URID, LV2_Options_Option > m_optionByUrid
options + data, ordered by URID
Definition Lv2Options.h:100
Cached URIDs for fast access (for use in real-time code).
Definition Lv2UridCache.h:41
Id
< ID for m_uridCache array
Definition Lv2UridCache.h:44
Definition RemotePluginBase.cpp:34
Definition Lv2UridCache.h:59