summaryrefslogtreecommitdiffstats
path: root/src/server/NodeImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-12-13 18:01:15 -0500
committerDavid Robillard <d@drobilla.net>2016-12-14 01:10:29 -0500
commit4df8895cf62db13f03ad7165c9d2b1060b04de4c (patch)
treeb3f5a25e67e901f1091eca0b8072e050c568a351 /src/server/NodeImpl.hpp
parentad43d2e08cea225635b56c5473a768bc853ecda3 (diff)
downloadingen-4df8895cf62db13f03ad7165c9d2b1060b04de4c.tar.gz
ingen-4df8895cf62db13f03ad7165c9d2b1060b04de4c.tar.bz2
ingen-4df8895cf62db13f03ad7165c9d2b1060b04de4c.zip
Don't use path to determine if nodes are the main graph
Doing so is slower and touches std::string code that could in theory not be RT-safe (though always is in practice).
Diffstat (limited to 'src/server/NodeImpl.hpp')
-rw-r--r--src/server/NodeImpl.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/NodeImpl.hpp b/src/server/NodeImpl.hpp
index dc85a757..517fbdb6 100644
--- a/src/server/NodeImpl.hpp
+++ b/src/server/NodeImpl.hpp
@@ -89,6 +89,14 @@ public:
virtual bool apply_poly(
RunContext& context, Raul::Maid& maid, uint32_t poly) = 0;
+ /** Return true iff this is main (the top level Node).
+ *
+ * This is sometimes called "the root graph", but the term "main" is used
+ * to avoid ambiguity with the root path, since main does not have the path
+ * "/", but usually "/main" to leave namespace for non-node things.
+ */
+ bool is_main() const { return !_parent; }
+
protected:
NodeImpl(const Ingen::URIs& uris,
NodeImpl* parent,