lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
Lv2UridMap.h
Go to the documentation of this file.
1
/*
2
* Lv2UridMap.cpp - Lv2UridMap class
3
*
4
* Copyright (c) 2019 Johannes Lorenz <j.git$$$lorenz-ho.me, $$$=@>
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_MAP_H
26
#define LMMS_LV2_URID_MAP_H
27
28
#include "lmmsconfig.h"
29
30
#ifdef LMMS_HAVE_LV2
31
32
#include <lv2/urid/urid.h>
33
#include <mutex>
// TODO: use semaphore, even though this is not realtime critical
34
#include <string>
35
#include <unordered_map>
36
#include <vector>
37
38
39
namespace
lmms
40
{
41
42
46
class
UridMap
47
{
48
std::unordered_map<std::string, LV2_URID>
m_map
;
49
std::vector<const char*>
m_unMap
;
50
53
std::mutex
m_MapMutex
;
54
55
LV2_URID_Map
m_mapFeature
;
56
LV2_URID_Unmap
m_unmapFeature
;
57
58
public
:
60
UridMap
();
61
63
LV2_URID
map
(
const
char
* uri);
65
const
char
*
unmap
(LV2_URID urid);
66
67
// access the features
68
LV2_URID_Map*
mapFeature
() {
return
&
m_mapFeature
; }
69
LV2_URID_Unmap*
unmapFeature
() {
return
&
m_unmapFeature
; }
70
};
71
72
73
}
// namespace lmms
74
75
#endif
// LMMS_HAVE_LV2
76
77
#endif
// LMMS_LV2_URID_MAP_H
lmms::UridMap::m_map
std::unordered_map< std::string, LV2_URID > m_map
Definition
Lv2UridMap.h:48
lmms::UridMap::map
LV2_URID map(const char *uri)
map feature function
Definition
Lv2UridMap.cpp:54
lmms::UridMap::unmap
const char * unmap(LV2_URID urid)
unmap feature function
Definition
Lv2UridMap.cpp:94
lmms::UridMap::m_mapFeature
LV2_URID_Map m_mapFeature
Definition
Lv2UridMap.h:55
lmms::UridMap::UridMap
UridMap()
constructor; will set up the features
Definition
Lv2UridMap.cpp:46
lmms::UridMap::mapFeature
LV2_URID_Map * mapFeature()
Definition
Lv2UridMap.h:68
lmms::UridMap::m_MapMutex
std::mutex m_MapMutex
Definition
Lv2UridMap.h:53
lmms::UridMap::unmapFeature
LV2_URID_Unmap * unmapFeature()
Definition
Lv2UridMap.h:69
lmms::UridMap::m_unmapFeature
LV2_URID_Unmap m_unmapFeature
Definition
Lv2UridMap.h:56
lmms::UridMap::m_unMap
std::vector< const char * > m_unMap
Definition
Lv2UridMap.h:49
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0