2 Copyright (C) 2002-2007 Paul Davis
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.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_bundle_h__
21 #define __ardour_bundle_h__
24 #include <sigc++/signal.h>
26 #include "ardour/data_type.h"
27 #include "ardour/chan_count.h"
31 typedef std::vector<std::string> PortList;
34 * A set of `channels', each of which is associated with 0 or more JACK ports.
39 Bundle () : _type (DataType::AUDIO) {}
40 Bundle (bool i) : _type (DataType::AUDIO), _ports_are_inputs (i) {}
41 Bundle (std::string const & n, bool i = true) : _name (n), _type (DataType::AUDIO), _ports_are_inputs (i) {}
46 * @return Number of channels that this Bundle has.
48 virtual ChanCount nchannels () const = 0;
49 virtual const PortList& channel_ports (uint32_t) const = 0;
51 void set_name (std::string const & n) {
56 std::string name () const { return _name; }
58 sigc::signal<void> NameChanged;
60 void set_type (DataType t) { _type = t; }
61 DataType type () const { return _type; }
63 void set_ports_are_inputs () { _ports_are_inputs = true; }
64 void set_ports_are_outputs () { _ports_are_inputs = false; }
65 bool ports_are_inputs () const { return _ports_are_inputs; }
66 bool ports_are_outputs () const { return !_ports_are_inputs; }
70 ARDOUR::DataType _type;
71 bool _ports_are_inputs;
76 #endif /* __ardour_bundle_h__ */