summaryrefslogtreecommitdiffstats
path: root/src/server/BlockImpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/BlockImpl.hpp')
-rw-r--r--src/server/BlockImpl.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index a1ca11b7..fc789813 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -72,6 +72,14 @@ public:
virtual GraphType graph_type() const { return GraphType::BLOCK; }
+ /** Return true iff this is main (the top level graph).
+ *
+ * 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; }
+
/** Activate this Block.
*
* This function must be called in a non-realtime thread before it is