LMMS
Loading...
Searching...
No Matches
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
35namespace lmms
36{
37
38
41{
42public:
43 enum class Id
44 {
45 // keep it alphabetically (except "size" at the end)
54 // exception to alphabetic ordering - keep at the end:
56 };
57
58 template<typename T>
59 struct IdForType;
60
62 uint32_t operator[](Id id) const;
63
64 Lv2UridCache(class UridMap& mapper);
65
66private:
67 uint32_t m_cache[static_cast<int>(Id::size)];
68};
69
70template<> struct Lv2UridCache::IdForType<float> { static constexpr auto value = Id::atom_Float; };
71template<> 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
uint32_t operator[](Id id) const
Return URID for a cache ID.
Definition Lv2UridCache.cpp:46
Lv2UridCache(class UridMap &mapper)
Definition Lv2UridCache.cpp:52
uint32_t m_cache[static_cast< int >(Id::size)]
Definition Lv2UridCache.h:67
Id
< ID for m_uridCache array
Definition Lv2UridCache.h:44
@ atom_Int
Definition Lv2UridCache.h:47
@ param_sampleRate
Definition Lv2UridCache.h:53
@ bufsz_maxBlockLength
Definition Lv2UridCache.h:49
@ bufsz_sequenceSize
Definition Lv2UridCache.h:51
@ midi_MidiEvent
Definition Lv2UridCache.h:52
@ bufsz_nominalBlockLength
Definition Lv2UridCache.h:50
@ bufsz_minBlockLength
Definition Lv2UridCache.h:48
@ atom_Float
Definition Lv2UridCache.h:46
@ size
Definition Lv2UridCache.h:55
Definition Lv2UridMap.h:47
uint32_t atom_Float
Definition lilv_test.c:1459
int int32_t
Definition mid.cpp:97
unsigned int uint32_t
Definition mid.cpp:100
Definition AudioAlsa.cpp:35
Definition juce_Uuid.h:141
static constexpr auto value
Definition Lv2UridCache.h:70
static constexpr auto value
Definition Lv2UridCache.h:71
Definition Lv2UridCache.h:59
ulg size
Definition extract.c:2350