From 9d9efa215c52a6b75eef7e9a8b088b11dfd76a07 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 8 Oct 2007 01:38:38 +0000 Subject: Shared abstract Connection interface. Only Patch to go, now.... git-svn-id: http://svn.drobilla.net/lad/ingen@843 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ConnectionModel.cpp | 78 ------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 src/libs/client/ConnectionModel.cpp (limited to 'src/libs/client/ConnectionModel.cpp') diff --git a/src/libs/client/ConnectionModel.cpp b/src/libs/client/ConnectionModel.cpp deleted file mode 100644 index d35457d1..00000000 --- a/src/libs/client/ConnectionModel.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include "ConnectionModel.hpp" -#include "PortModel.hpp" -#include "PatchModel.hpp" - -namespace Ingen { -namespace Client { - - -ConnectionModel::ConnectionModel(const Path& src_port, const Path& dst_port) -: _src_port_path(src_port), - _dst_port_path(dst_port) -{ - // Be sure connection is within one patch - //assert(_src_port_path.parent().parent() - // == _dst_port_path.parent().parent()); -} - - -ConnectionModel::ConnectionModel(SharedPtr src, SharedPtr dst) -: _src_port_path(src->path()), - _dst_port_path(dst->path()), - _src_port(src), - _dst_port(dst) -{ - assert(_src_port); - assert(_dst_port); - assert(_src_port->parent()); - assert(_dst_port->parent()); - - // Be sure connection is within one patch - //assert(_src_port_path.parent().parent() - // == _dst_port_path.parent().parent()); -} - - -const Path -ConnectionModel::src_port_path() const -{ - if (!_src_port) - return _src_port_path; - else - return _src_port->path(); -} - - -const Path -ConnectionModel::dst_port_path() const -{ - if (!_dst_port) - return _dst_port_path; - else - return _dst_port->path(); -} - - -typedef list > ConnectionList; - - -} // namespace Client -} // namespace Ingen -- cgit v1.2.1