Audacity 3.2.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ExtendedLV2FeaturesList Class Reference

Extends one (immutable) feature list (whose lifetime contains this one's) More...

#include <LV2FeaturesList.h>

Inheritance diagram for ExtendedLV2FeaturesList:
[legend]
Collaboration diagram for ExtendedLV2FeaturesList:
[legend]

Public Member Functions

 ExtendedLV2FeaturesList (WithBase_t, const LV2FeaturesListBase &baseFeatures)
 
virtual ~ExtendedLV2FeaturesList ()
 
FeaturePointers GetFeaturePointers () const override
 
void AddFeature (const char *uri, const void *data)
 
- Public Member Functions inherited from LV2FeaturesListBase
 LV2FeaturesListBase (const LilvPlugin &plug)
 
virtual ~LV2FeaturesListBase ()
 
 LV2FeaturesListBase (const LV2FeaturesListBase &)=delete
 
LV2FeaturesListBaseoperator= (const LV2FeaturesListBase &)=delete
 
virtual FeaturePointers GetFeaturePointers () const =0
 
bool ValidateFeatures (const LilvNode *subject)
 
bool CheckFeatures (const LilvNode *subject, bool required)
 

Public Attributes

const LV2FeaturesListBasemBaseFeatures
 
- Public Attributes inherited from LV2FeaturesListBase
const LilvPlugin & mPlug
 
bool mNoResize { false }
 

Protected Attributes

std::vector< LV2_Feature > mFeatures
 

Additional Inherited Members

- Public Types inherited from LV2FeaturesListBase
using FeaturePointers = std::vector< const LV2_Feature * >
 Get vector of pointers to features, whose .data() can be passed to lv2. More...
 

Detailed Description

Extends one (immutable) feature list (whose lifetime contains this one's)

Definition at line 67 of file LV2FeaturesList.h.

Constructor & Destructor Documentation

◆ ExtendedLV2FeaturesList()

ExtendedLV2FeaturesList::ExtendedLV2FeaturesList ( WithBase_t  ,
const LV2FeaturesListBase baseFeatures 
)
explicit

Definition at line 34 of file LV2FeaturesList.cpp.

36 : LV2FeaturesListBase{ baseFeatures.mPlug }
37 , mBaseFeatures{ baseFeatures }
38{
39}
const LV2FeaturesListBase & mBaseFeatures
const LilvPlugin & mPlug

◆ ~ExtendedLV2FeaturesList()

ExtendedLV2FeaturesList::~ExtendedLV2FeaturesList ( )
virtualdefault

Member Function Documentation

◆ AddFeature()

void ExtendedLV2FeaturesList::AddFeature ( const char *  uri,
const void *  data 
)

Definition at line 51 of file LV2FeaturesList.cpp.

52{
53 // This casting to const is innocent
54 // We pass our "virtual function tables" or array of options, which the
55 // library presumably will not change
56 mFeatures.emplace_back(LV2_Feature{ uri, const_cast<void*>(data) });
57}
std::vector< LV2_Feature > mFeatures

References mFeatures.

Referenced by LV2UIFeaturesList::InitializeFeatures(), LV2InstanceFeaturesList::LV2InstanceFeaturesList(), and LV2WrapperFeaturesList::LV2WrapperFeaturesList().

Here is the caller graph for this function:

◆ GetFeaturePointers()

auto ExtendedLV2FeaturesList::GetFeaturePointers ( ) const
overridevirtual

Implements LV2FeaturesListBase.

Definition at line 41 of file LV2FeaturesList.cpp.

42{
44 result.pop_back();
45 for (auto &feature : mFeatures)
46 result.push_back(&feature);
47 result.push_back(nullptr);
48 return result;
49}
std::vector< const LV2_Feature * > FeaturePointers
Get vector of pointers to features, whose .data() can be passed to lv2.
virtual FeaturePointers GetFeaturePointers() const =0

References LV2FeaturesListBase::GetFeaturePointers(), mBaseFeatures, and mFeatures.

Here is the call graph for this function:

Member Data Documentation

◆ mBaseFeatures

const LV2FeaturesListBase& ExtendedLV2FeaturesList::mBaseFeatures

◆ mFeatures

std::vector<LV2_Feature> ExtendedLV2FeaturesList::mFeatures
protected

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