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/GraphCanvas.hpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/gui/GraphCanvas.hpp') diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 6d4bbc87..77498748 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -27,12 +27,12 @@ #include "ganv/Canvas.hpp" #include "ganv/Module.hpp" -#include "raul/SharedPtr.hpp" +#include "ingen/Node.hpp" +#include "ingen/client/ArcModel.hpp" +#include "ingen/types.hpp" #include "raul/Path.hpp" #include "NodeModule.hpp" -#include "ingen/Node.hpp" -#include "ingen/client/ArcModel.hpp" namespace Ingen { @@ -49,10 +49,10 @@ class NodeModule; class GraphCanvas : public Ganv::Canvas { public: - GraphCanvas(App& app, - SharedPtr graph, - int width, - int height); + GraphCanvas(App& app, + SPtr graph, + int width, + int height); virtual ~GraphCanvas() {} @@ -63,13 +63,13 @@ public: void show_port_names(bool show); bool show_port_names() const { return _show_port_names; } - void add_plugin(SharedPtr pm); - void add_block(SharedPtr bm); - void remove_block(SharedPtr bm); - void add_port(SharedPtr pm); - void remove_port(SharedPtr pm); - void connection(SharedPtr am); - void disconnection(SharedPtr am); + void add_plugin(SPtr pm); + void add_block(SPtr bm); + void remove_block(SPtr bm); + void add_port(SPtr pm); + void remove_port(SPtr pm); + void connection(SPtr am); + void disconnection(SPtr am); void get_new_module_location(double& x, double& y); @@ -96,7 +96,7 @@ private: void menu_new_graph(); void menu_load_graph(); void menu_properties(); - void load_plugin(WeakPtr plugin); + void load_plugin(WPtr plugin); void build_menus(); @@ -116,7 +116,7 @@ private: Node::Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); - Ganv::Port* get_port_view(SharedPtr port); + Ganv::Port* get_port_view(SPtr port); void connect(Ganv::Node* src, Ganv::Node* dst); @@ -124,10 +124,10 @@ private: void disconnect(Ganv::Node* src, Ganv::Node* dst); - App& _app; - SharedPtr _graph; + App& _app; + SPtr _graph; - typedef std::map, Ganv::Module*> Views; + typedef std::map, Ganv::Module*> Views; Views _views; int _auto_position_count; -- cgit v1.2.1