From df1447c665e6c3631961297a9d3e9aff4e94c47f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 12 Jan 2013 23:38:03 +0000 Subject: Remove Raul::SharedPtr and switch to std::shared_ptr. Use project local short type aliases for shared_ptr and friends. Move Raul::Disposable and Raul::Manageable into Raul::Maid. Use sets to store machina nodes and edges to avoid O(n) searches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4939 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/Port.hpp | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/gui/Port.hpp') diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 94f66ecd..a9d24c1f 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -23,8 +23,7 @@ #include #include "ganv/Port.hpp" -#include "raul/SharedPtr.hpp" -#include "raul/WeakPtr.hpp" +#include "ingen/types.hpp" namespace Raul { class Atom; @@ -48,31 +47,31 @@ class Port : public Ganv::Port { public: static Port* create( - App& app, - Ganv::Module& module, - SharedPtr pm, - bool human_name, - bool flip = false); + App& app, + Ganv::Module& module, + SPtr pm, + bool human_name, + bool flip = false); ~Port(); - SharedPtr model() const { return _port_model.lock(); } + SPtr model() const { return _port_model.lock(); } bool show_menu(GdkEventButton* ev); void update_metadata(); void value_changed(const Raul::Atom& value); void activity(const Raul::Atom& value); - void disconnected_from(SharedPtr port); + void disconnected_from(SPtr port); void set_selected(gboolean b); private: - Port(App& app, - Ganv::Module& module, - SharedPtr pm, - const std::string& name, - bool flip = false); + Port(App& app, + Ganv::Module& module, + SPtr pm, + const std::string& name, + bool flip = false); Gtk::Menu* build_enum_menu(); Gtk::Menu* build_uri_menu(); @@ -86,11 +85,11 @@ private: void on_uri_activated(const Raul::URI& uri); bool on_event(GdkEvent* ev); - App& _app; - WeakPtr _port_model; - bool _pressed : 1; - bool _entered : 1; - bool _flipped : 1; + App& _app; + WPtr _port_model; + bool _pressed : 1; + bool _entered : 1; + bool _flipped : 1; }; } // namespace GUI -- cgit v1.2.1