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/progs/demolition/DemolitionClientInterface.cpp | 4 ++-- src/progs/demolition/DemolitionClientInterface.h | 10 +++++----- src/progs/demolition/DemolitionModel.cpp | 2 +- src/progs/demolition/DemolitionModel.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/progs/demolition') diff --git a/src/progs/demolition/DemolitionClientInterface.cpp b/src/progs/demolition/DemolitionClientInterface.cpp index a0704028..23f5733f 100644 --- a/src/progs/demolition/DemolitionClientInterface.cpp +++ b/src/progs/demolition/DemolitionClientInterface.cpp @@ -36,7 +36,7 @@ DemolitionClientInterface::error(string msg) void -DemolitionClientInterface::new_patch_model(PatchModel* pm) +DemolitionClientInterface::new_patch_model(CountedPtr pm) { m_model->add_patch(pm); } @@ -68,7 +68,7 @@ DemolitionClientInterface::patch_disabled(string path) void -DemolitionClientInterface::new_node_model(NodeModel* nm) +DemolitionClientInterface::new_node_model(CountedPtr nm) { m_model->add_node(nm); } diff --git a/src/progs/demolition/DemolitionClientInterface.h b/src/progs/demolition/DemolitionClientInterface.h index 83539afc..e1093411 100644 --- a/src/progs/demolition/DemolitionClientInterface.h +++ b/src/progs/demolition/DemolitionClientInterface.h @@ -56,19 +56,19 @@ public: void new_plugin(string type, string uri, string name) {} - void new_patch_model(PatchModel* const pm); - void new_port_model(PortModel* const port_model); + void new_patch_model(CountedPtr pm); + void new_port_model(CountedPtr port_model); void object_destroyed(string path); void patch_enabled(string path); void patch_disabled(string path); void patch_cleared(string path) { throw; } - void new_node_model(NodeModel* const nm); + void new_node_model(CountedPtr nm); void object_renamed(string old_path, string new_path); - void connection_model(ConnectionModel* const cm); + void connection_model(CountedPtr cm); void disconnection(string src_port_path, string dst_port_path); void metadata_update(string path, string key, string value) {} void control_change(string port_path, float value); - void new_plugin_model(PluginModel* const pi); + void new_plugin_model(CountedPtr pi); void program_add(string path, uint32_t bank, uint32_t program, string name) {}; void program_remove(string path, uint32_t bank, uint32_t program) {}; diff --git a/src/progs/demolition/DemolitionModel.cpp b/src/progs/demolition/DemolitionModel.cpp index b91b461a..8ac10195 100644 --- a/src/progs/demolition/DemolitionModel.cpp +++ b/src/progs/demolition/DemolitionModel.cpp @@ -189,7 +189,7 @@ DemolitionModel::remove_object(const Path& path) void -DemolitionModel::add_node(NodeModel* nm) +DemolitionModel::add_node(CountedPtr nm) { PatchModel* parent = patch(nm->path().parent()); if (parent == NULL) { diff --git a/src/progs/demolition/DemolitionModel.h b/src/progs/demolition/DemolitionModel.h index 67eb1005..6ae8c0ec 100644 --- a/src/progs/demolition/DemolitionModel.h +++ b/src/progs/demolition/DemolitionModel.h @@ -39,7 +39,7 @@ public: NodeModel* node(const Path& path); void add_patch(PatchModel* pm) { m_patches.push_back(pm); } - void add_node(NodeModel* nm); + void add_node(CountedPtr nm); void add_port(PortModel* pm); void remove_object(const Path& path); void add_connection(ConnectionModel* cm); -- cgit v1.2.1