diff options
author | David Robillard <d@drobilla.net> | 2006-06-18 08:06:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-18 08:06:14 +0000 |
commit | 172a0119ee0a0bb6d50836c70936907c3eb71c9e (patch) | |
tree | cbcc56285b033bb9857b9be85f5f9be193b6f38f /src/libs/engine/Port.h | |
parent | e6f42fd640dcbad6b2e39cc85bdf307d197278b0 (diff) | |
download | ingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.tar.gz ingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.tar.bz2 ingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.zip |
More work on new ports implementation;
lots of mass renaming and code removal.
git-svn-id: http://svn.drobilla.net/lad/grauph@52 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Port.h')
-rw-r--r-- | src/libs/engine/Port.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/libs/engine/Port.h b/src/libs/engine/Port.h index f51d7382..b6e1f607 100644 --- a/src/libs/engine/Port.h +++ b/src/libs/engine/Port.h @@ -21,13 +21,13 @@ #include <string> #include "util/types.h" #include "OmObject.h" +#include "DataType.h" using std::string; namespace Om { class Node; -class PortInfo; /** A port on a Node. @@ -45,9 +45,6 @@ public: Port* as_port() { return this; } - PortInfo* port_info() const { return m_port_info; } - void port_info(PortInfo* pi) { m_port_info = pi; } - void add_to_store(); void remove_from_store(); @@ -57,21 +54,27 @@ public: /** Empty buffer contents completely (ie silence) */ virtual void clear_buffers() = 0; - Node* parent_node() const { return m_parent->as_node(); } - bool is_sample() const { return false; } - size_t num() const { return m_index; } - size_t poly() const { return m_poly; } + virtual bool is_input() const = 0; + virtual bool is_output() const = 0; + + Node* parent_node() const { return _parent->as_node(); } + bool is_sample() const { return false; } + size_t num() const { return _index; } + size_t poly() const { return _poly; } + DataType type() const { return _type; } + size_t buffer_size() const { return _buffer_size; } protected: - Port(Node* const node, const string& name, size_t index, size_t poly, PortInfo* port_info); + Port(Node* const node, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); // Prevent copies (undefined) Port(const Port&); Port& operator=(const Port&); - size_t m_index; - size_t m_poly; - PortInfo* m_port_info; + size_t _index; + size_t _poly; + DataType _type; + size_t _buffer_size; }; |