lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
Lv2UridCache.h
Go to the documentation of this file.
1
/*
2
* Lv2UridCache.h - Lv2UridCache definition
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_URID_CACHE_H
26
#define LMMS_LV2_URID_CACHE_H
27
28
#include "lmmsconfig.h"
29
30
#ifdef LMMS_HAVE_LV2
31
32
#include <cstdint>
33
34
35
namespace
lmms
36
{
37
38
40
class
Lv2UridCache
41
{
42
public
:
43
enum class
Id
44
{
45
// keep it alphabetically (except "size" at the end)
46
atom_Float,
47
atom_Int,
48
bufsz_minBlockLength,
49
bufsz_maxBlockLength,
50
bufsz_nominalBlockLength,
51
bufsz_sequenceSize,
52
midi_MidiEvent,
53
param_sampleRate,
54
// exception to alphabetic ordering - keep at the end:
55
size
56
};
57
58
template
<
typename
T>
59
struct
IdForType
;
60
62
uint32_t
operator[]
(
Id
id
)
const
;
63
64
Lv2UridCache
(
class
UridMap
& mapper);
65
66
private
:
67
uint32_t
m_cache
[
static_cast<
int
>
(
Id::size
)];
68
};
69
70
template
<>
struct
Lv2UridCache::IdForType
<float> {
static
constexpr
auto
value
=
Id::atom_Float
; };
71
template
<>
struct
Lv2UridCache::IdForType
<std::int32_t> {
static
constexpr
auto
value
=
Id::atom_Int
; };
72
73
74
}
// namespace lmms
75
76
#endif
// LMMS_HAVE_LV2
77
78
#endif
// LMMS_LV2_URID_CACHE_H
lmms::Lv2UridCache::operator[]
uint32_t operator[](Id id) const
Return URID for a cache ID.
Definition
Lv2UridCache.cpp:46
lmms::Lv2UridCache::Lv2UridCache
Lv2UridCache(class UridMap &mapper)
Definition
Lv2UridCache.cpp:52
lmms::Lv2UridCache::m_cache
uint32_t m_cache[static_cast< int >(Id::size)]
Definition
Lv2UridCache.h:67
lmms::Lv2UridCache::Id
Id
< ID for m_uridCache array
Definition
Lv2UridCache.h:44
lmms::Lv2UridCache::Id::atom_Int
@ atom_Int
Definition
Lv2UridCache.h:47
lmms::Lv2UridCache::Id::atom_Float
@ atom_Float
Definition
Lv2UridCache.h:46
lmms::Lv2UridCache::Id::size
@ size
Definition
Lv2UridCache.h:55
lmms::UridMap
Definition
Lv2UridMap.h:47
lmms
Definition
RemotePluginBase.cpp:34
lmms::Lv2UridCache::IdForType< float >::value
static constexpr auto value
Definition
Lv2UridCache.h:70
lmms::Lv2UridCache::IdForType< std::int32_t >::value
static constexpr auto value
Definition
Lv2UridCache.h:71
lmms::Lv2UridCache::IdForType
Definition
Lv2UridCache.h:59
Generated on
for lmms by
1.18.0