diff options
author | David Robillard <d@drobilla.net> | 2012-08-15 05:24:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-15 05:24:41 +0000 |
commit | 5dd1d9b720993fc7813fe12fca0844f95033ff1b (patch) | |
tree | 344151dd656894340d217a8fe33f8dba53fe160f /src/server/DuplexPort.hpp | |
parent | 0a9297ed2a1622d252a389d8babc0656fedbe7fd (diff) | |
download | ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.tar.gz ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.tar.bz2 ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.zip |
Use intrusive lists to store nodes and ports in their parent patch to avoid tedious allocated list node juggling.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4700 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/DuplexPort.hpp')
-rw-r--r-- | src/server/DuplexPort.hpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp index 042f3681..90146e40 100644 --- a/src/server/DuplexPort.hpp +++ b/src/server/DuplexPort.hpp @@ -17,7 +17,7 @@ #ifndef INGEN_ENGINE_DUPLEXPORT_HPP #define INGEN_ENGINE_DUPLEXPORT_HPP -#include <string> +#include <boost/intrusive/slist.hpp> #include "BufferRef.hpp" #include "InputPort.hpp" @@ -28,15 +28,18 @@ namespace Server { class NodeImpl; -/** A duplex port (which is both an InputPort and an OutputPort) +/** A duplex Port (both an InputPort and an OutputPort on a Patch) * - * This is used for Patch ports, since they need to appear as both an input - * and an output port based on context. Eg. a patch output appears as an - * input inside the patch, so nodes inside the patch can feed it data. + * This is used for Patch ports, since they need to appear as both an input and + * an output port based on context. There are no actual duplex ports in Ingen, + * a Port is either an Input or Output. This class only exists to allow Patch + * outputs to appear as inputs to Nodes inside that patch, and vice versa. * * \ingroup engine */ -class DuplexPort : public InputPort, public OutputPort +class DuplexPort : public InputPort + , public OutputPort + , public boost::intrusive::slist_base_hook<> // In PatchImpl { public: DuplexPort(BufferFactory& bufs, @@ -51,7 +54,7 @@ public: size_t buffer_size, bool is_output); - virtual ~DuplexPort() {} + virtual ~DuplexPort(); uint32_t max_tail_poly(Context& context) const; |