diff options
Diffstat (limited to 'src/server/PortImpl.hpp')
-rw-r--r-- | src/server/PortImpl.hpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index cda6ab68..aac31fc8 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -20,10 +20,10 @@ #include <cstdlib> #include "ingen/Atom.hpp" +#include "ingen/Node.hpp" #include "raul/Array.hpp" #include "BufferRef.hpp" -#include "NodeImpl.hpp" #include "PortType.hpp" #include "types.hpp" @@ -44,7 +44,7 @@ class RunContext; * * \ingroup engine */ -class PortImpl : public NodeImpl +class PortImpl : public Node { public: struct SetState { @@ -101,6 +101,16 @@ public: virtual GraphType graph_type() const { return GraphType::PORT; } + BlockImpl* parent() const { return _parent; } + const Raul::Path& path() const { return _path; } + const Raul::Symbol& symbol() const { return _symbol; } + + void set_uri(const Raul::URI& uri) override { + _path = uri_to_path(uri); + _symbol = Raul::Symbol(_path.is_root() ? "main" : _path.symbol()); + Node::set_uri(uri); + } + /** Set the the voices (buffers) for this port in the audio thread. */ void set_voices(RunContext& context, MPtr<Voices>&& voices); @@ -278,6 +288,9 @@ protected: size_t num_in_arcs) const; BufferFactory& _bufs; + BlockImpl* _parent; + Raul::Path _path; + Raul::Symbol _symbol; uint32_t _index; uint32_t _poly; uint32_t _buffer_size; |