summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-18 00:38:45 +0000
committerDavid Robillard <d@drobilla.net>2009-11-18 00:38:45 +0000
commit6ec390d53a3dbea90e7308c9e40e03266f5d5127 (patch)
tree964973527778b5b2b28f8a5ebf63057fb7651d36 /src/engine/events
parent1a725c0811fd15900464e1eff429c6ead90805d4 (diff)
downloadingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.tar.gz
ingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.tar.bz2
ingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.zip
Rename DataType to PortType (since that's what it really means).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2273 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/ClearPatch.cpp4
-rw-r--r--src/engine/events/Connect.cpp4
-rw-r--r--src/engine/events/CreatePort.cpp2
-rw-r--r--src/engine/events/CreatePort.hpp4
-rw-r--r--src/engine/events/Delete.cpp4
-rw-r--r--src/engine/events/Move.cpp4
-rw-r--r--src/engine/events/RequestMetadata.cpp4
-rw-r--r--src/engine/events/SetMetadata.cpp4
8 files changed, 15 insertions, 15 deletions
diff --git a/src/engine/events/ClearPatch.cpp b/src/engine/events/ClearPatch.cpp
index 92c0156c..0b5c2127 100644
--- a/src/engine/events/ClearPatch.cpp
+++ b/src/engine/events/ClearPatch.cpp
@@ -114,10 +114,10 @@ ClearPatch::execute(ProcessContext& context)
for (EngineStore::Objects::iterator i = _removed_table->begin();
i != _removed_table->end(); ++i) {
SharedPtr<PortImpl> port = PtrCast<PortImpl>(i->second);
- if (port && port->type() == DataType::AUDIO) {
+ if (port && port->type() == PortType::AUDIO) {
_driver_ports->push_back(
_engine.audio_driver()->remove_port(port->path()));
- } else if (port && port->type() == DataType::EVENTS) {
+ } else if (port && port->type() == PortType::EVENTS) {
_driver_ports->push_back(
_engine.midi_driver()->remove_port(port->path()));
}
diff --git a/src/engine/events/Connect.cpp b/src/engine/events/Connect.cpp
index 62e32916..18c31e03 100644
--- a/src/engine/events/Connect.cpp
+++ b/src/engine/events/Connect.cpp
@@ -76,8 +76,8 @@ Connect::pre_process()
}
if ( ! (_src_port->type() == _dst_port->type()
- || ( (_src_port->type() == DataType::CONTROL || _src_port->type() == DataType::AUDIO)
- && (_dst_port->type() == DataType::CONTROL || _dst_port->type() == DataType::AUDIO) ))) {
+ || ( (_src_port->type() == PortType::CONTROL || _src_port->type() == PortType::AUDIO)
+ && (_dst_port->type() == PortType::CONTROL || _dst_port->type() == PortType::AUDIO) ))) {
_error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp
index 848092b1..60fd7cf9 100644
--- a/src/engine/events/CreatePort.cpp
+++ b/src/engine/events/CreatePort.cpp
@@ -72,7 +72,7 @@ CreatePort::CreatePort(
* TODO: fix this using RCU?
*/
- if (_data_type == DataType::UNKNOWN) {
+ if (_data_type == PortType::UNKNOWN) {
cerr << "[CreatePortEvent] Unknown port type " << type << endl;
_error = UNKNOWN_TYPE;
}
diff --git a/src/engine/events/CreatePort.hpp b/src/engine/events/CreatePort.hpp
index a0b3d2a5..af58fcfe 100644
--- a/src/engine/events/CreatePort.hpp
+++ b/src/engine/events/CreatePort.hpp
@@ -21,7 +21,7 @@
#include "QueuedEvent.hpp"
#include "raul/Path.hpp"
#include "raul/Array.hpp"
-#include "interface/DataType.hpp"
+#include "interface/PortType.hpp"
#include "interface/Resource.hpp"
namespace Ingen {
@@ -66,7 +66,7 @@ private:
Raul::Path _path;
Raul::URI _type;
bool _is_output;
- Shared::DataType _data_type;
+ Shared::PortType _data_type;
PatchImpl* _patch;
PortImpl* _patch_port;
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports array for Patch
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp
index aa773176..3c27ea94 100644
--- a/src/engine/events/Delete.cpp
+++ b/src/engine/events/Delete.cpp
@@ -153,9 +153,9 @@ Delete::execute(ProcessContext& context)
_port->parent_patch()->external_ports(_ports_array);
if ( ! _port->parent_patch()->parent()) {
- if (_port->type() == DataType::AUDIO)
+ if (_port->type() == PortType::AUDIO)
_driver_port = _engine.audio_driver()->remove_port(_port->path());
- else if (_port->type() == DataType::EVENTS)
+ else if (_port->type() == PortType::EVENTS)
_driver_port = _engine.midi_driver()->remove_port(_port->path());
// Apparently this needs to be called in post_process??
diff --git a/src/engine/events/Move.cpp b/src/engine/events/Move.cpp
index 9782e0d6..eb250dab 100644
--- a/src/engine/events/Move.cpp
+++ b/src/engine/events/Move.cpp
@@ -106,9 +106,9 @@ Move::execute(ProcessContext& context)
if (port && port->parent()->parent() == NULL) {
DriverPort* driver_port = NULL;
- if (port->type() == DataType::AUDIO)
+ if (port->type() == PortType::AUDIO)
driver_port = _engine.audio_driver()->driver_port(_new_path);
- else if (port->type() == DataType::EVENTS)
+ else if (port->type() == PortType::EVENTS)
driver_port = _engine.midi_driver()->driver_port(_new_path);
if (driver_port)
diff --git a/src/engine/events/RequestMetadata.cpp b/src/engine/events/RequestMetadata.cpp
index 2ef3edda..82165460 100644
--- a/src/engine/events/RequestMetadata.cpp
+++ b/src/engine/events/RequestMetadata.cpp
@@ -94,9 +94,9 @@ RequestMetadata::execute(ProcessContext& context)
if (_special_type == PORT_VALUE) {
PortImpl* port = dynamic_cast<PortImpl*>(_resource);
if (port) {
- if (port->type() == DataType::CONTROL || port->type() == DataType::AUDIO)
+ if (port->type() == PortType::CONTROL || port->type() == PortType::AUDIO)
_value = ((AudioBuffer*)port->buffer(0).get())->value_at(0); // TODO: offset
- else if (port->type() == DataType::VALUE)
+ else if (port->type() == PortType::VALUE)
LV2Object::to_atom(context.engine().world(),
((ObjectBuffer*)port->buffer(0).get())->object(), _value);
} else {
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp
index caed4909..7d9b5fa5 100644
--- a/src/engine/events/SetMetadata.cpp
+++ b/src/engine/events/SetMetadata.cpp
@@ -17,7 +17,7 @@
#include <string>
#include <boost/format.hpp>
-#include "interface/DataType.hpp"
+#include "interface/PortType.hpp"
#include "ClientBroadcaster.hpp"
#include "CreateNode.hpp"
#include "CreatePatch.hpp"
@@ -94,7 +94,7 @@ SetMetadata::pre_process()
if (is_graph_object && !_object) {
Path path(_subject.str());
bool is_patch = false, is_node = false, is_port = false, is_output = false;
- DataType data_type(DataType::UNKNOWN);
+ PortType data_type(PortType::UNKNOWN);
ResourceImpl::type(_properties, is_patch, is_node, is_port, is_output, data_type);
if (is_patch) {
uint32_t poly = 1;