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/GraphBox.cpp | |
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/GraphBox.cpp')
-rw-r--r-- | src/gui/GraphBox.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index fd47ee26..84116196 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -157,15 +157,15 @@ GraphBox::~GraphBox() delete _breadcrumbs; } -SharedPtr<GraphBox> -GraphBox::create(App& app, SharedPtr<const GraphModel> graph) +SPtr<GraphBox> +GraphBox::create(App& app, SPtr<const GraphModel> graph) { GraphBox* result = NULL; Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("graph_win"); xml->get_widget_derived("graph_win_vbox", result); result->init_box(app); - result->set_graph(graph, SharedPtr<GraphView>()); - return SharedPtr<GraphBox>(result); + result->set_graph(graph, SPtr<GraphView>()); + return SPtr<GraphBox>(result); } void @@ -193,13 +193,13 @@ GraphBox::init_box(App& app) } void -GraphBox::set_graph_from_path(const Raul::Path& path, SharedPtr<GraphView> view) +GraphBox::set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view) { if (view) { assert(view->graph()->path() == path); _app->window_factory()->present_graph(view->graph(), _window, view); } else { - SharedPtr<const GraphModel> model = PtrCast<const GraphModel>( + SPtr<const GraphModel> model = dynamic_ptr_cast<const GraphModel>( _app->store()->object(path)); if (model) { _app->window_factory()->present_graph(model, _window); @@ -212,8 +212,8 @@ GraphBox::set_graph_from_path(const Raul::Path& path, SharedPtr<GraphView> view) * If @a view is NULL, a new view will be created. */ void -GraphBox::set_graph(SharedPtr<const GraphModel> graph, - SharedPtr<GraphView> view) +GraphBox::set_graph(SPtr<const GraphModel> graph, + SPtr<GraphView> view) { if (!graph || graph == _graph) return; @@ -287,7 +287,7 @@ GraphBox::set_graph(SharedPtr<const GraphModel> graph, } void -GraphBox::graph_port_added(SharedPtr<const PortModel> port) +GraphBox::graph_port_added(SPtr<const PortModel> port) { if (port->is_input() && _app->can_control(port.get())) { _menu_view_control_window->property_sensitive() = true; @@ -295,7 +295,7 @@ GraphBox::graph_port_added(SharedPtr<const PortModel> port) } void -GraphBox::graph_port_removed(SharedPtr<const PortModel> port) +GraphBox::graph_port_removed(SPtr<const PortModel> port) { if (!(port->is_input() && _app->can_control(port.get()))) return; |