2 Copyright (C) 2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2 of the License, or (at your option)
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __ardour_data_type_h__
20 #define __ardour_data_type_h__
22 #include <jack/jack.h>
35 DataType(const Symbol& symbol)
39 /** Construct from a string (Used for loading from XML) */
40 DataType(const string& str) {
43 //else if (str == "midi")
49 bool operator==(const Symbol symbol) { return _symbol == symbol; }
50 bool operator!=(const Symbol symbol) { return _symbol != symbol; }
52 /** Get the Jack type this DataType corresponds to */
53 const char* to_jack_type() {
55 case AUDIO: return JACK_DEFAULT_AUDIO_TYPE;
56 //case MIDI: return JACK_DEFAULT_MIDI_TYPE;
61 /** Inverse of the from-string constructor */
62 const char* to_string() {
64 case AUDIO: return "audio";
65 //case MIDI: return "midi";
66 default: return "unknown"; // reeeally shouldn't ever happen
78 #endif // __ardour_data_type_h__