aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-23 23:53:37 +0000
committerDavid Robillard <d@drobilla.net>2007-02-23 23:53:37 +0000
commit64314961f83810d6b93e128013ed94deb0c7772a (patch)
tree47901f080f64cf4f0d9f2a52f8a0f990fc3be517 /src/engine
parent2d050bbc47e57e4361e0625c0c2ee30649252820 (diff)
downloadmachina-64314961f83810d6b93e128013ed94deb0c7772a.tar.gz
machina-64314961f83810d6b93e128013ed94deb0c7772a.tar.bz2
machina-64314961f83810d6b93e128013ed94deb0c7772a.zip
Removable edges.
GUI touchups. git-svn-id: http://svn.drobilla.net/lad/machina@332 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Node.cpp15
-rw-r--r--src/engine/machina/Node.hpp1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp
index a7aa453..224718e 100644
--- a/src/engine/Node.cpp
+++ b/src/engine/Node.cpp
@@ -101,6 +101,21 @@ Node::remove_outgoing_edge(SharedPtr<Edge> edge)
void
+Node::remove_outgoing_edges_to(SharedPtr<Node> node)
+{
+ for (EdgeList::iterator i = _outgoing_edges.begin(); i != _outgoing_edges.end() ; ) {
+ EdgeList::iterator next = i;
+ ++next;
+
+ if ((*i)->dst() == node)
+ _outgoing_edges.erase(i);
+
+ i = next;
+ }
+}
+
+
+void
Node::write_state(Raul::RDFWriter& writer)
{
using Raul::RdfId;
diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp
index c4d9dee..7573e39 100644
--- a/src/engine/machina/Node.hpp
+++ b/src/engine/machina/Node.hpp
@@ -57,6 +57,7 @@ public:
void add_outgoing_edge(SharedPtr<Edge> edge);
void remove_outgoing_edge(SharedPtr<Edge> edge);
+ void remove_outgoing_edges_to(SharedPtr<Node> node);
void write_state(Raul::RDFWriter& writer);