summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/InputPort.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
commite96c36c1a7abb062e36efc0ac95c35fedcef922e (patch)
tree826d5caa0392201472d12c02a1c3df4cf7b275be /src/libs/engine/InputPort.h
parent7d69e89f22304e37fa325ce4f39a374a02072a69 (diff)
downloadingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.gz
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.bz2
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.zip
De-template-ification of port types (req. for LV2 MIDI, but nice code size reduction).
LV2 MIDI patching support (LV2 style MIDI throughout, inc. internal plugins). git-svn-id: http://svn.drobilla.net/lad/ingen@415 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/InputPort.h')
-rw-r--r--src/libs/engine/InputPort.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/libs/engine/InputPort.h b/src/libs/engine/InputPort.h
index 14efd605..284f976f 100644
--- a/src/libs/engine/InputPort.h
+++ b/src/libs/engine/InputPort.h
@@ -22,14 +22,14 @@
#include <cstdlib>
#include <cassert>
#include <raul/List.h>
-#include "TypedPort.h"
-#include "MidiMessage.h"
+#include "Port.h"
+#include "MidiBuffer.h"
using std::string;
namespace Ingen {
-template <typename T> class TypedConnection;
-template <typename T> class OutputPort;
+class Connection;
+class OutputPort;
class Node;
@@ -44,22 +44,22 @@ class Node;
*
* \ingroup engine
*/
-template <typename T>
-class InputPort : virtual public TypedPort<T>
+class InputPort : virtual public Port
{
public:
InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size);
virtual ~InputPort() {}
- void add_connection(Raul::ListNode<TypedConnection<T>*>* const c);
- Raul::ListNode<TypedConnection<T>*>* remove_connection(const OutputPort<T>* const src_port);
+ void add_connection(Raul::ListNode<Connection*>* c);
+ Raul::ListNode<Connection*>* remove_connection(const OutputPort* src_port);
- const Raul::List<TypedConnection<T>*>& connections() { return _connections; }
+ typedef Raul::List<Connection*> Connections;
+ const Connections& connections() { return _connections; }
void process(SampleCount nframes, FrameTime start, FrameTime end);
bool is_connected() const { return (_connections.size() > 0); }
- bool is_connected_to(const OutputPort<T>* const port) const;
+ bool is_connected_to(const OutputPort* port) const;
bool is_input() const { return true; }
bool is_output() const { return false; }
@@ -67,21 +67,10 @@ public:
virtual void set_buffer_size(size_t size);
private:
-
- Raul::List<TypedConnection<T>*> _connections;
-
- // This is just stupid...
- using TypedPort<T>::_buffers;
- using TypedPort<T>::_poly;
- using TypedPort<T>::_index;
- using TypedPort<T>::_buffer_size;
- using TypedPort<T>::_fixed_buffers;
+ Connections _connections;
};
-template class InputPort<Sample>;
-template class InputPort<MidiMessage>;
-
} // namespace Ingen
#endif // INPUTPORT_H