LMMS
Loading...
Searching...
No Matches
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
39namespace lmms
40{
41
42
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
57
58public:
60 UridMap();
61
63 LV2_URID map(const char* uri);
65 const char* unmap(LV2_URID urid);
66
67 // access the features
70};
71
72
73} // namespace lmms
74
75#endif // LMMS_HAVE_LV2
76
77#endif // LMMS_LV2_URID_MAP_H
std::unordered_map< std::string, LV2_URID > m_map
Definition Lv2UridMap.h:48
LV2_URID map(const char *uri)
map feature function
Definition Lv2UridMap.cpp:54
const char * unmap(LV2_URID urid)
unmap feature function
Definition Lv2UridMap.cpp:94
LV2_URID_Map m_mapFeature
Definition Lv2UridMap.h:55
UridMap()
constructor; will set up the features
Definition Lv2UridMap.cpp:46
LV2_URID_Map * mapFeature()
Definition Lv2UridMap.h:68
std::mutex m_MapMutex
Definition Lv2UridMap.h:53
LV2_URID_Unmap * unmapFeature()
Definition Lv2UridMap.h:69
LV2_URID_Unmap m_unmapFeature
Definition Lv2UridMap.h:56
std::vector< const char * > m_unMap
Definition Lv2UridMap.h:49
uint32_t LV2_URID
Definition urid.h:58
static SordNode * uri(SordWorld *world, int num)
Definition sord_test.c:47
Definition AudioAlsa.cpp:35
Definition urid.h:69
Definition urid.h:105