diff options
author | David Robillard <d@drobilla.net> | 2012-08-15 04:18:31 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-15 04:18:31 +0000 |
commit | 0a9297ed2a1622d252a389d8babc0656fedbe7fd (patch) | |
tree | 3f8e72bcb12e62f36eceda789cd1912c39eda2a4 /src/server/Driver.hpp | |
parent | 859ace60e8b1c4c0d9c5bea88d8eed1265ea859e (diff) | |
download | ingen-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/Driver.hpp')
-rw-r--r-- | src/server/Driver.hpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/server/Driver.hpp b/src/server/Driver.hpp index e551f636..1d6e7ef0 100644 --- a/src/server/Driver.hpp +++ b/src/server/Driver.hpp @@ -17,13 +17,12 @@ #ifndef INGEN_ENGINE_DRIVER_HPP #define INGEN_ENGINE_DRIVER_HPP -#include <string> +#include <boost/intrusive/list.hpp> -#include <boost/utility.hpp> - -#include "raul/Deletable.hpp" +#include "raul/Noncopyable.hpp" #include "DuplexPort.hpp" +#include "EnginePort.hpp" namespace Raul { class Path; } @@ -33,15 +32,15 @@ namespace Server { class DuplexPort; class EnginePort; -/** Driver abstract base class. +/** Engine driver base class. * * A Driver is, from the perspective of GraphObjects (nodes, patches, ports) an * interface for managing system ports. An implementation of Driver basically - * needs to manage DriverPorts, and handle writing/reading data to/from them. + * needs to manage EnginePorts, and handle writing/reading data to/from them. * * \ingroup engine */ -class Driver : boost::noncopyable { +class Driver : public Raul::Noncopyable { public: virtual ~Driver() {} @@ -57,14 +56,24 @@ public: virtual EnginePort* create_port(DuplexPort* patch_port) = 0; /** Find a system port by path. */ - virtual EnginePort* port(const Raul::Path& path) = 0; + virtual EnginePort* get_port(const Raul::Path& path) = 0; /** Add a system visible port (e.g. a port on the root patch). */ virtual void add_port(ProcessContext& context, EnginePort* port) = 0; - /** Remove a system visible port. */ - virtual Raul::Deletable* remove_port(ProcessContext& context, - EnginePort* port) = 0; + /** Remove a system visible port. + * + * This removes the port from the driver in the process thread but does not + * destroy the port. To actually remove the system port, unregister_port() + * must be called later in another thread. + */ + virtual void remove_port(ProcessContext& context, EnginePort* port) = 0; + + /** Register a system visible port. */ + virtual void register_port(EnginePort& port) = 0; + + /** Register a system visible port. */ + virtual void unregister_port(EnginePort& port) = 0; /** Rename a system visible port. */ virtual void rename_port(const Raul::Path& old_path, |