summaryrefslogtreecommitdiffstats
path: root/src/server/EnginePort.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-15 04:18:31 +0000
committerDavid Robillard <d@drobilla.net>2012-08-15 04:18:31 +0000
commit0a9297ed2a1622d252a389d8babc0656fedbe7fd (patch)
tree3f8e72bcb12e62f36eceda789cd1912c39eda2a4 /src/server/EnginePort.hpp
parent859ace60e8b1c4c0d9c5bea88d8eed1265ea859e (diff)
downloadingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.tar.gz
ingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.tar.bz2
ingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.zip
Simpler and more unified EnginePort implementation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4699 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/EnginePort.hpp')
-rw-r--r--src/server/EnginePort.hpp40
1 files changed, 15 insertions, 25 deletions
diff --git a/src/server/EnginePort.hpp b/src/server/EnginePort.hpp
index c911c118..3bda2998 100644
--- a/src/server/EnginePort.hpp
+++ b/src/server/EnginePort.hpp
@@ -17,53 +17,43 @@
#ifndef INGEN_ENGINE_ENGINE_PORT_HPP
#define INGEN_ENGINE_ENGINE_PORT_HPP
-#include <string>
-
#include "raul/Deletable.hpp"
#include "raul/Noncopyable.hpp"
-#include "DuplexPort.hpp"
+#include <boost/intrusive/list.hpp>
-namespace Raul { class Path; }
+#include "DuplexPort.hpp"
namespace Ingen {
namespace Server {
-class DuplexPort;
-class ProcessContext;
-
-/** Representation of a "system" port (e.g. a Jack port).
- *
- * This is the class through which the rest of the engine manages everything
- * related to driver ports. Derived classes are expected to have a pointer to
- * their driver (to be able to perform the operation necessary).
+/** A "system" port (e.g. a Jack port, an external port on Ingen).
*
- * \ingroup engine
+ * @ingroup engine
*/
-class EnginePort : public Raul::Noncopyable, public Raul::Deletable {
+class EnginePort : public Raul::Noncopyable
+ , public Raul::Deletable
+ , public boost::intrusive::list_base_hook<>
+{
public:
explicit EnginePort(DuplexPort* port)
: _patch_port(port)
, _buffer(NULL)
+ , _handle(NULL)
{}
- virtual ~EnginePort() {}
+ void set_buffer(void* buf) { _buffer = buf; }
+ void set_handle(void* buf) { _handle = buf; }
- /** Create system port */
- virtual void create() {}
-
- /** Destroy system port */
- virtual void destroy() {}
-
- void* buffer() const { return _buffer; }
- void set_buffer(void* buf) { _buffer = buf; }
-
- bool is_input() const { return _patch_port->is_input(); }
+ void* buffer() const { return _buffer; }
+ void* handle() const { return _handle; }
DuplexPort* patch_port() const { return _patch_port; }
+ bool is_input() const { return _patch_port->is_input(); }
protected:
DuplexPort* _patch_port;
void* _buffer;
+ void* _handle;
};
} // namespace Server