diff options
author | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
commit | df1447c665e6c3631961297a9d3e9aff4e94c47f (patch) | |
tree | c0ff117c362e6d571f430f886ab62f372b59af08 /src/gui/Port.hpp | |
parent | bb335dca695273622b7a4ebbefbe9e089edb9ab4 (diff) | |
download | ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.gz ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.bz2 ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.zip |
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
Diffstat (limited to 'src/gui/Port.hpp')
-rw-r--r-- | src/gui/Port.hpp | 37 |
1 files changed, 18 insertions, 19 deletions
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 <gtkmm/menu.h> #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<const Client::PortModel> pm, - bool human_name, - bool flip = false); + App& app, + Ganv::Module& module, + SPtr<const Client::PortModel> pm, + bool human_name, + bool flip = false); ~Port(); - SharedPtr<const Client::PortModel> model() const { return _port_model.lock(); } + SPtr<const Client::PortModel> 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<Client::PortModel> port); + void disconnected_from(SPtr<Client::PortModel> port); void set_selected(gboolean b); private: - Port(App& app, - Ganv::Module& module, - SharedPtr<const Client::PortModel> pm, - const std::string& name, - bool flip = false); + Port(App& app, + Ganv::Module& module, + SPtr<const Client::PortModel> 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<const Client::PortModel> _port_model; - bool _pressed : 1; - bool _entered : 1; - bool _flipped : 1; + App& _app; + WPtr<const Client::PortModel> _port_model; + bool _pressed : 1; + bool _entered : 1; + bool _flipped : 1; }; } // namespace GUI |