14#ifndef __AUDACITY_LV2_FEATURES_LIST__
15#define __AUDACITY_LV2_FEATURES_LIST__
19#include "lv2/log/log.h"
20#include "lv2/uri-map/uri-map.h"
27#define DEFAULT_SEQSIZE 8192
49 bool ValidateFeatures(
const LilvNode *subject);
56 bool CheckFeatures(
const LilvNode *subject,
bool required);
59 bool mNoResize{
false };
73 void AddFeature(
const char *uri,
const void *data);
87 bool InitializeFeatures();
93 static bool SuppliesWorkerInterface(
const LilvPlugin &plug);
99 void AddFeature(
const char *uri,
const void *data);
104 {
return const_cast<LV2_URID_Map*
>(&mURIDMapFeature); }
106 LV2_URID URID_Map(
const char *uri)
const;
109 static uint32_t uri_to_id(LV2_URI_Map_Callback_Data callback_data,
110 const char *map,
const char *uri);
111 static LV2_URID urid_map(LV2_URID_Map_Handle handle,
const char *uri);
112 static const char *urid_unmap(LV2_URID_Unmap_Handle handle, LV2_URID urid);
113 const char *URID_Unmap(LV2_URID urid);
115 static int log_printf(LV2_Log_Handle handle,
116 LV2_URID type,
const char *fmt, ...);
117 static int log_vprintf(LV2_Log_Handle handle,
118 LV2_URID type,
const char *fmt, va_list ap);
119 int LogVPrintf(LV2_URID type,
const char *fmt, va_list ap);
122 const LV2_URI_Map_Feature mUriMapFeature{
126 const LV2_Log_Log mLogFeature{
constexpr WithBase_t WithBase
Lilv_ptr< LilvNodes, lilv_nodes_free > LilvNodesPtr
Declare URI identifiers used in calls to the lv2 library and a mapping of them to integers.
std::unique_ptr< Type, Lilv_deleter< Type, f > > Lilv_ptr
Generate classes of smart pointers to lv2 resources.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Extends one (immutable) feature list (whose lifetime contains this one's)
virtual ~ExtendedLV2FeaturesList()
const LV2FeaturesListBase & mBaseFeatures
std::vector< LV2_Feature > mFeatures
std::vector< const LV2_Feature * > FeaturePointers
Get vector of pointers to features, whose .data() can be passed to lv2.
LV2FeaturesListBase & operator=(const LV2FeaturesListBase &)=delete
LV2FeaturesListBase(const LV2FeaturesListBase &)=delete
virtual ~LV2FeaturesListBase()
virtual FeaturePointers GetFeaturePointers() const =0
LV2_URID_Map * URIDMapFeature() const
~LV2FeaturesList() override
LV2Symbols::URIDMap mURIDMap
Per-effect URID map allocates an ID for each URI on first lookup.
static LV2_URID urid_map(LV2_URID_Map_Handle handle, const char *uri)
std::vector< LV2_Feature > mFeatures
static uint32_t uri_to_id(LV2_URI_Map_Callback_Data callback_data, const char *map, const char *uri)
const bool mSuppliesWorkerInterface
static int log_printf(LV2_Log_Handle handle, LV2_URID type, const char *fmt,...)
static const char * urid_unmap(LV2_URID_Unmap_Handle handle, LV2_URID urid)
static int log_vprintf(LV2_Log_Handle handle, LV2_URID type, const char *fmt, va_list ap)
bool SuppliesWorkerInterface() const
std::vector< MallocString<> > URIDMap