summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 04:51:33 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 04:51:33 +0000
commit260a406b12997fdab7446a9980e921d8cfc46915 (patch)
treed900ce2737a2b027a632c6ecb80cf889cb6ebc6d /src/libs/engine/events
parentfae7e7519afae5f42836eaaf5e317151ea9c4378 (diff)
downloadingen-260a406b12997fdab7446a9980e921d8cfc46915.tar.gz
ingen-260a406b12997fdab7446a9980e921d8cfc46915.tar.bz2
ingen-260a406b12997fdab7446a9980e921d8cfc46915.zip
SharedPtr-ize engine-side Connections (towards merge for patch->connections()).
git-svn-id: http://svn.drobilla.net/lad/ingen@846 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp2
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp2
-rw-r--r--src/libs/engine/events/ConnectionEvent.hpp7
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp2
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp2
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp2
6 files changed, 9 insertions, 8 deletions
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index 84731d0a..0d76724a 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -92,7 +92,7 @@ ClearPatchEvent::post_process()
_patch->nodes().clear();
// Delete all connections
- for (List< SharedPtr<ConnectionImpl> >::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
+ for (Patch::Connections::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
(*i).reset();
_patch->connections().clear();
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index ce84c4bc..3a954781 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -126,8 +126,8 @@ ConnectionEvent::pre_process()
}
_connection = SharedPtr<ConnectionImpl>(new ConnectionImpl(_src_port, _dst_port));
- _port_listnode = new Patch::Connections::Node(_connection);
_patch_listnode = new Patch::Connections::Node(_connection);
+ _port_listnode = new InputPort::Connections::Node(_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 3c2f1f68..1d46be6f 100644
--- a/src/libs/engine/events/ConnectionEvent.hpp
+++ b/src/libs/engine/events/ConnectionEvent.hpp
@@ -22,6 +22,7 @@
#include <raul/Path.hpp>
#include "QueuedEvent.hpp"
#include "Patch.hpp"
+#include "InputPort.hpp"
#include "types.hpp"
using std::string;
@@ -78,9 +79,9 @@ private:
CompiledPatch* _compiled_patch; ///< New process order for Patch
- SharedPtr<ConnectionImpl> _connection;
- Patch::Connections::Node* _patch_listnode;
- Patch::Connections::Node* _port_listnode;
+ SharedPtr<ConnectionImpl> _connection;
+ Patch::Connections::Node* _patch_listnode;
+ InputPort::Connections::Node* _port_listnode;
ErrorType _error;
};
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index 723bd864..f085e974 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -89,7 +89,7 @@ DisconnectNodeEvent::pre_process()
}
for (Patch::Connections::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
- const SharedPtr<ConnectionImpl> c(*i);
+ ConnectionImpl* c = (ConnectionImpl*)i->get();
if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index 5fa82b15..9aaf5c45 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -105,7 +105,7 @@ DisconnectPortEvent::pre_process()
for (Patch::Connections::const_iterator i = _patch->connections().begin();
i != _patch->connections().end(); ++i) {
- const SharedPtr<ConnectionImpl> c(*i);
+ ConnectionImpl* c = (ConnectionImpl*)i->get();
if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index aa686b0c..6e69c3ba 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -157,7 +157,7 @@ DisconnectionEvent::execute(ProcessContext& context)
QueuedEvent::execute(context);
if (_error == NO_ERROR) {
- Patch::Connections::Node* const port_connection
+ InputPort::Connections::Node* const port_connection
= _dst_input_port->remove_connection(_src_output_port);
if (port_connection != NULL) {