2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
3 * Copyright (C) 2006 Paul Davis
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __ardour_io_vector_h__
21 #define __ardour_io_vector_h__
24 #include <boost/shared_ptr.hpp>
25 #include "ardour/io.h"
29 class IOVector : public std::vector<boost::weak_ptr<ARDOUR::IO> >
32 #if 0 // unused -- for future reference
33 bool connected_to (const IOVector& other) const {
34 for (IOVector::const_iterator i = other.begin(); i != other.end(); ++i) {
35 boost::shared_ptr<const IO> io = i->lock();
37 if (connected_to (io)) {
44 bool connected_to (boost::shared_ptr<const IO> other) const {
45 for (IOVector::const_iterator i = begin(); i != end(); ++i) {
46 boost::shared_ptr<const IO> io = i->lock();
48 if (io->connected_to (other)) {
56 bool fed_by (boost::shared_ptr<const IO> other) const {
57 for (IOVector::const_iterator i = begin(); i != end(); ++i) {
58 boost::shared_ptr<const IO> io = i->lock();
60 if (other->connected_to (io)) {