From 00f2ad0069fe4e51e40e6a3b3d41f125b67f89cf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 7 Jun 2011 02:44:16 +0000 Subject: Remove use of smart pointers in FlowCanvas entirely. Since FlowCanvas's containers own their children, there is no real benefit to using smart pointers for objects, though there is overhead. There are no longer any add or remove methods for containers, simply create (new) and destroy (delete) objects and things should work as expected. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3366 a436a847-0d15-0410-975c-d299462d15a1 --- src/AlsaDriver.hpp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/AlsaDriver.hpp') diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp index ab849b9..54c35b1 100644 --- a/src/AlsaDriver.hpp +++ b/src/AlsaDriver.hpp @@ -44,16 +44,17 @@ public: bool is_attached() const { return (_seq != NULL); } void refresh(); + void destroy_all(); - boost::shared_ptr create_port_view( + PatchagePort* create_port_view( Patchage* patchage, const PortID& id); - bool connect(boost::shared_ptr src_port, - boost::shared_ptr dst_port); + bool connect(PatchagePort* src_port, + PatchagePort* dst_port); - bool disconnect(boost::shared_ptr src_port, - boost::shared_ptr dst_port); + bool disconnect(PatchagePort* src_port, + PatchagePort* dst_port); void print_addr(snd_seq_addr_t addr); @@ -63,13 +64,13 @@ private: void refresh_ports(); void refresh_connections(); - void add_connections(boost::shared_ptr port); + void add_connections(PatchagePort* port); bool create_refresh_port(); static void* refresh_main(void* me); void _refresh_main(); - boost::shared_ptr + PatchageModule* find_or_create_module( Patchage* patchage, const std::string& client_name, @@ -77,16 +78,16 @@ private: void create_port_view_internal( - Patchage* patchage, - snd_seq_addr_t addr, - boost::shared_ptr& parent, - boost::shared_ptr& port); - - boost::shared_ptr create_port( - boost::shared_ptr parent, - const std::string& name, - bool is_input, - snd_seq_addr_t addr); + Patchage* patchage, + snd_seq_addr_t addr, + PatchageModule*& parent, + PatchagePort*& port); + + PatchagePort* create_port( + PatchageModule& parent, + const std::string& name, + bool is_input, + snd_seq_addr_t addr); Patchage* _app; snd_seq_t* _seq; -- cgit v1.2.1