diff options
Diffstat (limited to 'src/server/BlockImpl.hpp')
-rw-r--r-- | src/server/BlockImpl.hpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index fc789813..1a794e2d 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -22,12 +22,11 @@ #include <boost/intrusive/slist.hpp> #include <boost/optional.hpp> +#include "ingen/Node.hpp" #include "lilv/lilv.h" - #include "raul/Array.hpp" #include "BufferRef.hpp" -#include "NodeImpl.hpp" #include "PluginImpl.hpp" #include "PortType.hpp" #include "RunContext.hpp" @@ -56,7 +55,7 @@ class Worker; * * \ingroup engine */ -class BlockImpl : public NodeImpl +class BlockImpl : public Node , public boost::intrusive::slist_base_hook<> // In GraphImpl { public: @@ -72,6 +71,17 @@ public: virtual GraphType graph_type() const { return GraphType::BLOCK; } + BlockImpl* parent() const { return _parent; } + GraphImpl* graph_parent() const { return (GraphImpl*)_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); + } + /** Return true iff this is main (the top level graph). * * This is sometimes called "the root graph", but the term "main" is used @@ -200,6 +210,9 @@ public: protected: PortImpl* nth_port_by_type(uint32_t n, bool input, PortType type); + BlockImpl* _parent; + Raul::Path _path; + Raul::Symbol _symbol; PluginImpl* _plugin; MPtr<Ports> _ports; ///< Access in audio thread only uint32_t _polyphony; |