diff options
author | David Robillard <d@drobilla.net> | 2012-12-29 20:34:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-29 20:34:32 +0000 |
commit | 79275fc579c0dbe1ce4ca109edb95f2c1e0802a5 (patch) | |
tree | 72bb18ea61f485c47514a511dd3067c57aa2fb4b /src/client/ClientStore.cpp | |
parent | 9bdf223f830d3b430563e96d93efc073b1882e96 (diff) | |
download | ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.gz ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.bz2 ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.zip |
"edge" => "arc".
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4897 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r-- | src/client/ClientStore.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index fe79336b..6b2c1540 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -15,11 +15,11 @@ */ #include "ingen/Log.hpp" -#include "ingen/client/ClientStore.hpp" -#include "ingen/client/EdgeModel.hpp" +#include "ingen/client/ArcModel.hpp" #include "ingen/client/BlockModel.hpp" -#include "ingen/client/ObjectModel.hpp" +#include "ingen/client/ClientStore.hpp" #include "ingen/client/GraphModel.hpp" +#include "ingen/client/ObjectModel.hpp" #include "ingen/client/PluginModel.hpp" #include "ingen/client/PortModel.hpp" #include "ingen/client/SigClientInterface.hpp" @@ -391,7 +391,7 @@ ClientStore::connection_graph(const Raul::Path& tail_path, graph = PtrCast<GraphModel>(_object(tail_path.parent().parent())); if (!graph) - _log.error(Raul::fmt("Unable to find graph for edge %1% => %2%\n") + _log.error(Raul::fmt("Unable to find graph for arc %1% => %2%\n") % tail_path % head_path); return graph; @@ -406,12 +406,12 @@ ClientStore::attempt_connection(const Raul::Path& tail_path, if (tail && head) { SharedPtr<GraphModel> graph = connection_graph(tail_path, head_path); - SharedPtr<EdgeModel> cm(new EdgeModel(tail, head)); + SharedPtr<ArcModel> arc(new ArcModel(tail, head)); tail->connected_to(head); head->connected_to(tail); - graph->add_edge(cm); + graph->add_arc(arc); return true; } else { _log.warn(Raul::fmt("Failed to connect %1% => %2%\n") @@ -442,7 +442,7 @@ ClientStore::disconnect(const Raul::Path& src_path, SharedPtr<GraphModel> graph = connection_graph(src_path, dst_path); if (graph) - graph->remove_edge(tail.get(), head.get()); + graph->remove_arc(tail.get(), head.get()); } void @@ -458,17 +458,17 @@ ClientStore::disconnect_all(const Raul::Path& parent_graph, return; } - const GraphModel::Edges edges = graph->edges(); - for (GraphModel::Edges::const_iterator i = edges.begin(); - i != edges.end(); ++i) { - SharedPtr<EdgeModel> c = PtrCast<EdgeModel>(i->second); - if (c->tail()->parent() == object - || c->head()->parent() == object - || c->tail()->path() == path - || c->head()->path() == path) { - c->tail()->disconnected_from(c->head()); - c->head()->disconnected_from(c->tail()); - graph->remove_edge(c->tail().get(), c->head().get()); + const GraphModel::Arcs arcs = graph->arcs(); + for (GraphModel::Arcs::const_iterator i = arcs.begin(); + i != arcs.end(); ++i) { + SharedPtr<ArcModel> arc = PtrCast<ArcModel>(i->second); + if (arc->tail()->parent() == object + || arc->head()->parent() == object + || arc->tail()->path() == path + || arc->head()->path() == path) { + arc->tail()->disconnected_from(arc->head()); + arc->head()->disconnected_from(arc->tail()); + graph->remove_arc(arc->tail().get(), arc->head().get()); } } } |