Ardour  9.0-pre0-582-g084a23a80d
event_type_map.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 David Robillard <d@drobilla.net>
3  * Copyright (C) 2009 Hans Baier <hansfbaier@googlemail.com>
4  * Copyright (C) 2013 Paul Davis <paul@linuxaudiosystems.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #pragma once
22 
23 #include <map>
24 #include <string>
25 
26 #include "evoral/TypeMap.h"
27 #include "evoral/ControlList.h"
29 
31 
32 namespace ARDOUR {
33 
34 class URIMap;
35 
40 public:
42 
43  bool type_is_midi(uint32_t type) const;
44  uint8_t parameter_midi_type(const Evoral::Parameter& param) const;
45 
46  Evoral::ParameterType midi_parameter_type(const uint8_t* buf, uint32_t len) const;
47 
49 
50  Evoral::Parameter from_symbol(const std::string& str) const;
51  std::string to_symbol(const Evoral::Parameter& param) const;
52 
54 
55  void set_descriptor(const Evoral::Parameter& param,
56  const Evoral::ParameterDescriptor& desc);
57 
58 private:
59  typedef std::map<Evoral::Parameter, Evoral::ParameterDescriptor> Descriptors;
60 
61  EventTypeMap(URIMap* uri_map) : _uri_map(uri_map) {}
62 
65 
67 };
68 
69 } // namespace ARDOUR
70 
71 
std::string to_symbol(const Evoral::Parameter &param) const
void set_descriptor(const Evoral::Parameter &param, const Evoral::ParameterDescriptor &desc)
Descriptors _descriptors
static EventTypeMap * event_type_map
uint8_t parameter_midi_type(const Evoral::Parameter &param) const
Evoral::ControlList::InterpolationStyle interpolation_of(const Evoral::Parameter &param)
Evoral::Parameter from_symbol(const std::string &str) const
bool type_is_midi(uint32_t type) const
EventTypeMap(URIMap *uri_map)
Evoral::ParameterType midi_parameter_type(const uint8_t *buf, uint32_t len) const
Evoral::ParameterDescriptor descriptor(const Evoral::Parameter &param) const
static EventTypeMap & instance()
std::map< Evoral::Parameter, Evoral::ParameterDescriptor > Descriptors
#define LIBARDOUR_API
uint32_t ParameterType