From ed80c779a6085ce62b9f61a28263607983db93a1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 9 May 2012 12:22:59 +0000 Subject: DriverPort => EnginePort. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4327 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/EnginePort.hpp | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/server/EnginePort.hpp (limited to 'src/server/EnginePort.hpp') diff --git a/src/server/EnginePort.hpp b/src/server/EnginePort.hpp new file mode 100644 index 00000000..39f25d5c --- /dev/null +++ b/src/server/EnginePort.hpp @@ -0,0 +1,69 @@ +/* + This file is part of Ingen. + Copyright 2007-2012 David Robillard + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or any later version. + + Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see . +*/ + +#ifndef INGEN_ENGINE_ENGINE_PORT_HPP +#define INGEN_ENGINE_ENGINE_PORT_HPP + +#include + +#include + +#include "raul/Deletable.hpp" + +#include "DuplexPort.hpp" + +namespace Raul { class Path; } + +namespace Ingen { +namespace Server { + +class DuplexPort; +class ProcessContext; + +/** Representation of a "system" (eg outside Ingen) 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). + * + * \ingroup engine + */ +class EnginePort : boost::noncopyable, public Raul::Deletable { +public: + virtual ~EnginePort() {} + + /** Set the name of the system port according to new path */ + virtual void move(const Raul::Path& path) = 0; + + /** Create system port */ + virtual void create() = 0; + + /** Destroy system port */ + virtual void destroy() = 0; + + bool is_input() const { return _patch_port->is_input(); } + DuplexPort* patch_port() const { return _patch_port; } + +protected: + explicit EnginePort(DuplexPort* port) : _patch_port(port) {} + + DuplexPort* _patch_port; +}; + +} // namespace Server +} // namespace Ingen + +#endif // INGEN_ENGINE_ENGINE_PORT_HPP -- cgit v1.2.1