From b15864870d34a1188eda93ad215734275037278e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 Sep 2006 11:10:35 +0000 Subject: Switched homebrew CountedPtr to boost::shared_ptr. Factories for patch windows, controller. Robustness updated in many places. Tons of cleanups, rewrites, bugfixes, etc. git-svn-id: http://svn.drobilla.net/lad/ingen@128 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ModelClientInterface.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/libs/client/ModelClientInterface.cpp') diff --git a/src/libs/client/ModelClientInterface.cpp b/src/libs/client/ModelClientInterface.cpp index 440f2a73..deb37187 100644 --- a/src/libs/client/ModelClientInterface.cpp +++ b/src/libs/client/ModelClientInterface.cpp @@ -26,31 +26,31 @@ namespace Client { void -ModelClientInterface::new_plugin_model(PluginModel* pi) +ModelClientInterface::new_plugin_model(CountedPtr pi) { } void -ModelClientInterface::new_patch_model(PatchModel* pm) +ModelClientInterface::new_patch_model(CountedPtr pm) { } void -ModelClientInterface::new_node_model(NodeModel* nm) +ModelClientInterface::new_node_model(CountedPtr nm) { } void -ModelClientInterface::new_port_model(PortModel* port_info) +ModelClientInterface::new_port_model(CountedPtr port_info) { } void -ModelClientInterface::connection_model(ConnectionModel* cm) +ModelClientInterface::connection_model(CountedPtr cm) { } @@ -67,7 +67,7 @@ ModelClientInterface::new_plugin(string type, string uri, string name) { - PluginModel* plugin = new PluginModel(type, uri); + CountedPtr plugin(new PluginModel(type, uri)); plugin->name(name); new_plugin_model(plugin); } @@ -77,7 +77,7 @@ ModelClientInterface::new_plugin(string type, void ModelClientInterface::new_patch(string path, uint32_t poly) { - PatchModel* pm = new PatchModel(path, poly); + CountedPtr pm(new PatchModel(path, poly)); //PluginModel* pi = new PluginModel(PluginModel::Patch); //pm->plugin(pi); new_patch_model(pm); @@ -94,9 +94,9 @@ ModelClientInterface::new_node(string plugin_type, { cerr << "FIXME: NEW NODE\n"; - PluginModel* plugin = new PluginModel(plugin_type, plugin_uri); + CountedPtr plugin(new PluginModel(plugin_type, plugin_uri)); - NodeModel* nm = new NodeModel(plugin, node_path); + CountedPtr nm(new NodeModel(plugin, node_path)); new_node_model(nm); } @@ -116,7 +116,7 @@ ModelClientInterface::new_port(string path, PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT; - PortModel* port_model = new PortModel(path, ptype, pdir); + CountedPtr port_model(new PortModel(path, ptype, pdir)); new_port_model(port_model); } @@ -126,7 +126,7 @@ void ModelClientInterface::connection(string src_port_path, string dst_port_path) { - connection_model(new ConnectionModel(src_port_path, dst_port_path)); + connection_model(CountedPtr(new ConnectionModel(src_port_path, dst_port_path))); } -- cgit v1.2.1