summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 01:38:38 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 01:38:38 +0000
commit9d9efa215c52a6b75eef7e9a8b088b11dfd76a07 (patch)
tree7983e607cf87ddd4b1e099eedfb218880805717d /src/libs/engine/events
parenta421a44310ee472fbee15f150d32b826a8371dbf (diff)
downloadingen-9d9efa215c52a6b75eef7e9a8b088b11dfd76a07.tar.gz
ingen-9d9efa215c52a6b75eef7e9a8b088b11dfd76a07.tar.bz2
ingen-9d9efa215c52a6b75eef7e9a8b088b11dfd76a07.zip
Shared abstract Connection interface.
Only Patch to go, now.... git-svn-id: http://svn.drobilla.net/lad/ingen@843 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp4
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp8
-rw-r--r--src/libs/engine/events/ConnectionEvent.hpp9
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp8
-rw-r--r--src/libs/engine/events/DisconnectionEvent.hpp3
-rw-r--r--src/libs/engine/events/SetPolyphonicEvent.cpp2
-rw-r--r--src/libs/engine/events/SetPolyphonyEvent.cpp2
9 files changed, 23 insertions, 25 deletions
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index 1e6c0748..ad35d162 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -25,7 +25,7 @@
#include "ObjectStore.hpp"
#include "PortImpl.hpp"
#include "NodeImpl.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "QueuedEventSource.hpp"
namespace Ingen {
@@ -92,7 +92,7 @@ ClearPatchEvent::post_process()
_patch->nodes().clear();
// Delete all connections
- for (Raul::List<Connection*>::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
+ for (Raul::List<ConnectionImpl*>::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
delete *i;
_patch->connections().clear();
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index 7f8fa18e..733a46d4 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -22,7 +22,7 @@
#include "Responder.hpp"
#include "types.hpp"
#include "Engine.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "InputPort.hpp"
#include "OutputPort.hpp"
#include "Patch.hpp"
@@ -126,9 +126,9 @@ ConnectionEvent::pre_process()
return;
}
- _connection = new Connection(_src_port, _dst_port);
- _port_listnode = new Raul::ListNode<Connection*>(_connection);
- _patch_listnode = new Raul::ListNode<Connection*>(_connection);
+ _connection = new ConnectionImpl(_src_port, _dst_port);
+ _port_listnode = new Raul::ListNode<ConnectionImpl*>(_connection);
+ _patch_listnode = new Raul::ListNode<ConnectionImpl*>(_connection);
// Need to be careful about patch port connections here and adding a node's
// parent as a dependant/provider, or adding a patch as it's own provider...
diff --git a/src/libs/engine/events/ConnectionEvent.hpp b/src/libs/engine/events/ConnectionEvent.hpp
index 8fa8c489..d7465566 100644
--- a/src/libs/engine/events/ConnectionEvent.hpp
+++ b/src/libs/engine/events/ConnectionEvent.hpp
@@ -33,10 +33,9 @@ namespace Ingen {
class Patch;
class NodeImpl;
-class Connection;
+class ConnectionImpl;
class MidiMessage;
class PortImpl;
-class Connection;
class InputPort;
class OutputPort;
class CompiledPatch;
@@ -78,9 +77,9 @@ private:
CompiledPatch* _compiled_patch; ///< New process order for Patch
- Connection* _connection;
- Raul::ListNode<Connection*>* _patch_listnode;
- Raul::ListNode<Connection*>* _port_listnode;
+ ConnectionImpl* _connection;
+ Raul::ListNode<ConnectionImpl*>* _patch_listnode;
+ Raul::ListNode<ConnectionImpl*>* _port_listnode;
ErrorType _error;
};
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index 8612d012..e0507b3a 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -20,7 +20,7 @@
#include <raul/Maid.hpp>
#include <raul/Path.hpp>
#include "ClientBroadcaster.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "DisconnectNodeEvent.hpp"
#include "DisconnectionEvent.hpp"
#include "Engine.hpp"
@@ -70,7 +70,7 @@ DisconnectNodeEvent::~DisconnectNodeEvent()
void
DisconnectNodeEvent::pre_process()
{
- typedef Raul::List<Connection*>::const_iterator ConnectionListIterator;
+ typedef Raul::List<ConnectionImpl*>::const_iterator ConnectionListIterator;
if (_lookup) {
_patch = _engine.object_store()->find_patch(_node_path.parent());
@@ -90,7 +90,7 @@ DisconnectNodeEvent::pre_process()
}
}
- Connection* c = NULL;
+ ConnectionImpl* c = NULL;
for (ConnectionListIterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node) && !c->pending_disconnection()) {
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index f7ad9925..76a4cbc4 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -23,7 +23,7 @@
#include "Responder.hpp"
#include "Engine.hpp"
#include "NodeImpl.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "DisconnectionEvent.hpp"
#include "PortImpl.hpp"
#include "InputPort.hpp"
@@ -103,8 +103,8 @@ DisconnectPortEvent::pre_process()
return;
}
- Connection* c = NULL;
- for (Raul::List<Connection*>::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
+ ConnectionImpl* c = NULL;
+ for (Raul::List<ConnectionImpl*>::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index 215e0202..68068821 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -21,7 +21,7 @@
#include <raul/Path.hpp>
#include "Responder.hpp"
#include "Engine.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "InputPort.hpp"
#include "OutputPort.hpp"
#include "Patch.hpp"
@@ -157,15 +157,15 @@ DisconnectionEvent::execute(ProcessContext& context)
QueuedEvent::execute(context);
if (_error == NO_ERROR) {
- Raul::ListNode<Connection*>* const port_connection
+ Raul::ListNode<ConnectionImpl*>* const port_connection
= _dst_input_port->remove_connection(_src_output_port);
if (port_connection != NULL) {
- Raul::ListNode<Connection*>* const patch_connection
+ Raul::ListNode<ConnectionImpl*>* const patch_connection
= _patch->remove_connection(_src_port, _dst_port);
assert(patch_connection);
- assert((Connection*)port_connection->elem() == patch_connection->elem());
+ assert((ConnectionImpl*)port_connection->elem() == patch_connection->elem());
// Clean up both the list node and the connection itself...
_engine.maid()->push(port_connection);
diff --git a/src/libs/engine/events/DisconnectionEvent.hpp b/src/libs/engine/events/DisconnectionEvent.hpp
index aacb5082..603eaf47 100644
--- a/src/libs/engine/events/DisconnectionEvent.hpp
+++ b/src/libs/engine/events/DisconnectionEvent.hpp
@@ -33,10 +33,9 @@ namespace Ingen {
class Patch;
class NodeImpl;
-class Connection;
+class ConnectionImpl;
class MidiMessage;
class PortImpl;
-class Connection;
class InputPort;
class OutputPort;
class CompiledPatch;
diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp
index 8cca2373..51ab2dc8 100644
--- a/src/libs/engine/events/SetPolyphonicEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonicEvent.cpp
@@ -25,7 +25,7 @@
#include "ObjectStore.hpp"
#include "PortImpl.hpp"
#include "NodeImpl.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "QueuedEventSource.hpp"
namespace Ingen {
diff --git a/src/libs/engine/events/SetPolyphonyEvent.cpp b/src/libs/engine/events/SetPolyphonyEvent.cpp
index 8e0d12cd..56e95486 100644
--- a/src/libs/engine/events/SetPolyphonyEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonyEvent.cpp
@@ -25,7 +25,7 @@
#include "ObjectStore.hpp"
#include "PortImpl.hpp"
#include "NodeImpl.hpp"
-#include "Connection.hpp"
+#include "ConnectionImpl.hpp"
#include "QueuedEventSource.hpp"
namespace Ingen {