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>
25 #include "ardour/data_type.h"
29 typedef std::vector<std::string> PortList;
32 * A set of `channels', each of which is associated with 0 or more JACK ports.
37 Bundle () : _type (DataType::AUDIO) {}
38 Bundle (bool i) : _type (DataType::AUDIO), _ports_are_inputs (i) {}
39 Bundle (std::string const & n, bool i = true) : _name (n), _type (DataType::AUDIO), _ports_are_inputs (i) {}
43 * @return Number of channels that this Bundle has.
45 virtual uint32_t nchannels () const = 0;
46 virtual const PortList& channel_ports (uint32_t) const = 0;
48 void set_name (std::string const & n) {
53 std::string name () const { return _name; }
55 sigc::signal<void> NameChanged;
57 void set_type (DataType t) { _type = t; }
58 DataType type () const { return _type; }
60 void set_ports_are_inputs () { _ports_are_inputs = true; }
61 void set_ports_are_outputs () { _ports_are_inputs = false; }
62 bool ports_are_inputs () const { return _ports_are_inputs; }
63 bool ports_are_outputs () const { return !_ports_are_inputs; }
67 ARDOUR::DataType _type;
68 bool _ports_are_inputs;
73 #endif /* __ardour_bundle_h__ */