summaryrefslogtreecommitdiffstats
path: root/src/server/events/Disconnect.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-11 03:56:54 +0000
committerDavid Robillard <d@drobilla.net>2012-05-11 03:56:54 +0000
commit3dd4b42f3054f819c865e9415c4b86ba78d43aec (patch)
tree656d152cdffdd9196013fe9f35d46f4cf73c6927 /src/server/events/Disconnect.cpp
parent7be6d5d05756a7dea20c494d56f364b4dc064c88 (diff)
downloadingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.tar.gz
ingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.tar.bz2
ingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.zip
"Connection" => "Edge"
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4345 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/Disconnect.cpp')
-rw-r--r--src/server/events/Disconnect.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index e7ed572f..6d3ae31f 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -22,7 +22,7 @@
#include "AudioBuffer.hpp"
#include "ClientBroadcaster.hpp"
-#include "ConnectionImpl.hpp"
+#include "EdgeImpl.hpp"
#include "DuplexPort.hpp"
#include "Engine.hpp"
#include "EngineStore.hpp"
@@ -63,7 +63,7 @@ Disconnect::Impl::Impl(Engine& e,
, _src_output_port(s)
, _dst_input_port(d)
, _patch(patch)
- , _connection(patch->remove_connection(_src_output_port, _dst_input_port))
+ , _edge(patch->remove_edge(_src_output_port, _dst_input_port))
, _buffers(NULL)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
@@ -87,9 +87,9 @@ Disconnect::Impl::Impl(Engine& e,
}
}
- _dst_input_port->decrement_num_connections();
+ _dst_input_port->decrement_num_edges();
- if (_dst_input_port->num_connections() == 0) {
+ if (_dst_input_port->num_edges() == 0) {
_buffers = new Raul::Array<BufferRef>(_dst_input_port->poly());
_dst_input_port->get_buffers(*_engine.buffer_factory(),
_buffers, _dst_input_port->poly());
@@ -132,27 +132,25 @@ Disconnect::pre_process()
NodeImpl* const src_node = _tail->parent_node();
NodeImpl* const dst_node = _head->parent_node();
- // Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
-
+ // Edge to a patch port from inside the patch
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
- if (src_node->parent() == dst_node)
+ if (src_node->parent() == dst_node) {
_patch = dynamic_cast<PatchImpl*>(dst_node);
- else
+ } else {
_patch = dynamic_cast<PatchImpl*>(src_node);
-
- // Connection from a patch input to a patch output (pass through)
+ }
} else if (src_node == dst_node && dynamic_cast<PatchImpl*>(src_node)) {
+ // Edge from a patch input to a patch output (pass through)
_patch = dynamic_cast<PatchImpl*>(src_node);
-
- // Normal connection between nodes with the same parent
} else {
+ // Normal edge between nodes with the same parent
_patch = src_node->parent_patch();
}
assert(_patch);
- if (!_patch->has_connection(_tail, _head)) {
+ if (!_patch->has_edge(_tail, _head)) {
_status = NOT_FOUND;
Event::pre_process();
return;
@@ -180,9 +178,9 @@ Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers)
{
ThreadManager::assert_thread(THREAD_PROCESS);
- ConnectionImpl* const port_connection
- = _dst_input_port->remove_connection(context, _src_output_port);
- if (!port_connection) {
+ EdgeImpl* const port_edge =
+ _dst_input_port->remove_edge(context, _src_output_port);
+ if (!port_edge) {
return false;
}
@@ -198,8 +196,8 @@ Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers)
_dst_input_port->recycle_buffers();
}
- assert(_connection);
- assert(port_connection == _connection.get());
+ assert(_edge);
+ assert(port_edge == _edge.get());
return true;
}