1 /*
2  * Author: Harry van Haaren 2013
3  *         harryhaaren@gmail.com
4  *
5  *  This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 
20 #ifndef LUPPP_BINDING_H
21 #define LUPPP_BINDING_H
22 
23 #include <map>
24 
25 /// a LupppAction represents the Event type, as from Event.hxx
26 typedef int LupppAction;
27 
28 class Binding
29 {
30 public:
Binding()31 	Binding() : status(0), data(0), action(0), active(1),
32 		track(-2),scene(-1),send(-1)
33 	{
34 		ID = privateID++;
35 	}
36 
37 	int ID;
38 
39 	unsigned char status;
40 	unsigned char data;
41 
42 	/// the action this binding relates to: this is an integer based on the
43 	/// event.hxx enumeration of event types
44 	LupppAction action;
45 
46 	/// arguments to the event: track number, scene number etc
47 	int active;
48 	int track;
49 	int scene;
50 	int send;
51 
52 	/// maps from Gridlogic::State to MIDI output value from binding
53 	std::map<int,int> clipStateMap;
54 
55 private:
56 	/// static int counter to allow deleting this specific instance
57 	static int privateID;
58 
59 };
60 
61 #endif
62