lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
Lv2Features.h
Go to the documentation of this file.
1
/*
2
* Lv2Features.h - Lv2Features class
3
*
4
* Copyright (c) 2020-2020 Johannes Lorenz <jlsf2013$users.sourceforge.net, $=@>
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*
23
*/
24
25
#ifndef LMMS_LV2_FEATURES_H
26
#define LMMS_LV2_FEATURES_H
27
28
#include "lmmsconfig.h"
29
30
#ifdef LMMS_HAVE_LV2
31
32
#include <map>
33
#include <string_view>
34
#include <vector>
35
36
#include <lv2/core/lv2.h>
37
38
namespace
lmms
39
{
40
54
class
Lv2Features
55
{
56
public
:
58
static
bool
isFeatureSupported
(
const
char
*featName);
59
60
Lv2Features
();
61
63
void
initCommon
();
65
void
*&
operator[]
(
const
char
* featName);
67
void
createFeatureVectors
();
69
const
LV2_Feature*
const
*
featurePointers
()
const
70
{
71
return
m_featurePointers
.data();
72
}
73
74
void
clear
();
75
76
private
:
78
std::vector<LV2_Feature>
m_features
;
80
std::vector<const LV2_Feature*>
m_featurePointers
;
82
std::map<std::string_view, void*>
m_featureByUri
;
83
};
84
85
86
}
// namespace lmms
87
88
#endif
// LMMS_HAVE_LV2
89
90
#endif
// LMMS_LV2_FEATURES_H
lmms::Lv2Features::operator[]
void *& operator[](const char *featName)
Return reference to feature data with given URI featName.
Definition
Lv2Features.cpp:100
lmms::Lv2Features::Lv2Features
Lv2Features()
Definition
Lv2Features.cpp:47
lmms::Lv2Features::isFeatureSupported
static bool isFeatureSupported(const char *featName)
Return if a feature is supported by LMMS.
Definition
Lv2Features.cpp:39
lmms::Lv2Features::createFeatureVectors
void createFeatureVectors()
Fill m_features and m_featurePointers with all features.
Definition
Lv2Features.cpp:71
lmms::Lv2Features::featurePointers
const LV2_Feature *const * featurePointers() const
Return LV2_Feature pointer vector, suited for lilv_plugin_instantiate.
Definition
Lv2Features.h:69
lmms::Lv2Features::clear
void clear()
Clear everything.
Definition
Lv2Features.cpp:110
lmms::Lv2Features::m_featurePointers
std::vector< const LV2_Feature * > m_featurePointers
pointers to m_features, required for lilv_plugin_instantiate
Definition
Lv2Features.h:80
lmms::Lv2Features::initCommon
void initCommon()
Register only plugin-common features.
Definition
Lv2Features.cpp:60
lmms::Lv2Features::m_features
std::vector< LV2_Feature > m_features
feature storage
Definition
Lv2Features.h:78
lmms::Lv2Features::m_featureByUri
std::map< std::string_view, void * > m_featureByUri
features + data, ordered by URI
Definition
Lv2Features.h:82
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0