Ardour  9.0-pre0-582-g084a23a80d
TypeMap.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 David Robillard <d@drobilla.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EVORAL_TYPE_MAP_HPP
20 #define EVORAL_TYPE_MAP_HPP
21 
22 #include <stdint.h>
23 
24 #include <string>
25 
26 #include "evoral/visibility.h"
27 #include "evoral/types.h"
28 
29 namespace Evoral {
30 
31 class Parameter;
32 struct ParameterDescriptor;
33 
37 class /*LIBEVORAL_API*/ TypeMap {
38 public:
39  virtual ~TypeMap() {}
40 
44  virtual bool type_is_midi(uint32_t type) const = 0;
45 
49  virtual uint8_t parameter_midi_type(const Parameter& param) const = 0;
50 
52  virtual ParameterType midi_parameter_type(const uint8_t* buf, uint32_t len) const = 0;
53 
55  virtual ParameterDescriptor descriptor(const Parameter& param) const = 0;
56 
57  virtual std::string to_symbol(const Parameter& param) const = 0;
58 };
59 
60 } // namespace Evoral
61 
62 #endif // EVORAL_TYPE_MAP_HPP
virtual std::string to_symbol(const Parameter &param) const =0
virtual uint8_t parameter_midi_type(const Parameter &param) const =0
virtual ~TypeMap()
Definition: TypeMap.h:39
virtual ParameterDescriptor descriptor(const Parameter &param) const =0
virtual ParameterType midi_parameter_type(const uint8_t *buf, uint32_t len) const =0
virtual bool type_is_midi(uint32_t type) const =0
Definition: editor.h:86
uint32_t ParameterType