LMMS
Loading...
Searching...
No Matches
lmms::Lv2Options Class Reference

#include <Lv2Options.h>

Public Member Functions

template<typename Opt, typename Arg>
void initOption (Lv2UridCache::Id key, Arg &&value, LV2_Options_Context context=LV2_OPTIONS_INSTANCE, std::uint32_t subject=0)
 Initialize an option.
void createOptionVectors ()
 Fill m_options and m_optionPointers with all options.
const LV2_Options_Optionfeature () const
 Return the feature.
void clear ()

Static Public Member Functions

static bool isOptionSupported (LV2_URID key)
 Return if an option is supported by LMMS.
static void supportOption (LV2_URID key)
 Mark option as supported.

Private Member Functions

void initOption (LV2_URID key, uint32_t size, LV2_URID type, std::shared_ptr< void > value, LV2_Options_Context context=LV2_OPTIONS_INSTANCE, uint32_t subject=0)
 Initialize an option internally.

Private Attributes

std::map< LV2_URID, LV2_Options_Optionm_optionByUrid
 options + data, ordered by URID
std::vector< LV2_Options_Optionm_options
 option storage
std::map< LV2_URID, std::shared_ptr< void > > m_optionValues
 option value storage

Static Private Attributes

static std::set< LV2_URIDs_supportedOptions
 options that are supported by every processor

Detailed Description

Option container

References all available options for a plugin and maps them to their URIDs. This class is used per Lv2 processor (justification in Lv2Proc::initMOptions())

The public member functions should be called in descending order:

  1. supportOption: set all supported option URIDs
  2. initOption: initialize options with values
  3. createOptionVectors: create the option vectors required for the feature
  4. access the latter using feature()

Member Function Documentation

◆ clear()

void lmms::Lv2Options::clear ( )

◆ createOptionVectors()

void lmms::Lv2Options::createOptionVectors ( )

Fill m_options and m_optionPointers with all options.

◆ feature()

const LV2_Options_Option * lmms::Lv2Options::feature ( ) const
inline

Return the feature.

◆ initOption() [1/2]

void lmms::Lv2Options::initOption ( LV2_URID key,
uint32_t size,
LV2_URID type,
std::shared_ptr< void > value,
LV2_Options_Context context = LV2_OPTIONS_INSTANCE,
uint32_t subject = 0 )
private

Initialize an option internally.

◆ initOption() [2/2]

template<typename Opt, typename Arg>
void lmms::Lv2Options::initOption ( Lv2UridCache::Id key,
Arg && value,
LV2_Options_Context context = LV2_OPTIONS_INSTANCE,
std::uint32_t subject = 0 )
inline

Initialize an option.

◆ isOptionSupported()

bool lmms::Lv2Options::isOptionSupported ( LV2_URID key)
static

Return if an option is supported by LMMS.

◆ supportOption()

void lmms::Lv2Options::supportOption ( LV2_URID key)
static

Mark option as supported.

Member Data Documentation

◆ m_optionByUrid

std::map<LV2_URID, LV2_Options_Option> lmms::Lv2Options::m_optionByUrid
private

options + data, ordered by URID

◆ m_options

std::vector<LV2_Options_Option> lmms::Lv2Options::m_options
private

option storage

◆ m_optionValues

std::map<LV2_URID, std::shared_ptr<void> > lmms::Lv2Options::m_optionValues
private

option value storage

◆ s_supportedOptions

std::set< LV2_URID > lmms::Lv2Options::s_supportedOptions
staticprivate

options that are supported by every processor


The documentation for this class was generated from the following files: