From cc384f6f622cc10fd83616256080b80dc2123aaf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Sep 2006 02:27:02 +0000 Subject: Cleaned up client-side model code significantly (made everything private so only Store can change the state of models). Extremely broken, just committing to move code between machines :). git-svn-id: http://svn.drobilla.net/lad/ingen@133 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ModelClientInterface.cpp | 136 ------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 src/libs/client/ModelClientInterface.cpp (limited to 'src/libs/client/ModelClientInterface.cpp') diff --git a/src/libs/client/ModelClientInterface.cpp b/src/libs/client/ModelClientInterface.cpp deleted file mode 100644 index d29395e7..00000000 --- a/src/libs/client/ModelClientInterface.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* This file is part of Ingen. Copyright (C) 2006 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 "ModelClientInterface.h" -#include "PatchModel.h" -#include "ConnectionModel.h" -#include "PresetModel.h" -#include "NodeModel.h" -#include "PluginModel.h" - -namespace Ingen { -namespace Client { - - -void -ModelClientInterface::new_plugin_model(CountedPtr pi) -{ -} - - -void -ModelClientInterface::new_patch_model(CountedPtr pm) -{ -} - - -void -ModelClientInterface::new_node_model(CountedPtr nm) -{ -} - - -void -ModelClientInterface::new_port_model(CountedPtr port_info) -{ -} - - -void -ModelClientInterface::connection_model(CountedPtr cm) -{ -} - - - -/* Implementations of ClientInterface functions to drive - * the above functions: - */ - - - -void -ModelClientInterface::new_plugin(string type, - string uri, - string name) -{ - CountedPtr plugin(new PluginModel(type, uri)); - plugin->name(name); - new_plugin_model(plugin); -} - - - -void -ModelClientInterface::new_patch(string path, uint32_t poly) -{ - CountedPtr pm(new PatchModel(path, poly)); - //PluginModel* pi = new PluginModel(PluginModel::Patch); - //pm->plugin(pi); - new_patch_model(pm); -} - - - -void -ModelClientInterface::new_node(string plugin_type, - string plugin_uri, - string node_path, - bool is_polyphonic, - uint32_t num_ports) -{ - cerr << "FIXME: NEW NODE\n"; - - CountedPtr plugin(new PluginModel(plugin_type, plugin_uri)); - - CountedPtr nm(new NodeModel(plugin, node_path, is_polyphonic)); - - new_node_model(nm); -} - - - -void -ModelClientInterface::new_port(string path, - string type, - bool is_output) -{ - PortModel::Type ptype = PortModel::CONTROL; - if (type != "AUDIO") ptype = PortModel::AUDIO; - else if (type != "CONTROL") ptype = PortModel::CONTROL; - else if (type != "MIDI") ptype = PortModel::MIDI; - else cerr << "[ModelClientInterface] WARNING: Unknown port type received (" << type << ")" << endl; - - PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT; - - CountedPtr port_model(new PortModel(path, ptype, pdir)); - new_port_model(port_model); -} - - - -void -ModelClientInterface::connection(string src_port_path, - string dst_port_path) -{ - connection_model(CountedPtr(new ConnectionModel(src_port_path, dst_port_path))); -} - - - - -} // namespace Client -} // namespace Ingen -- cgit v1.2.1