OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
node_visitor.hpp
1#pragma once
2#include <ossia/network/base/node.hpp>
3
4namespace ossia::net
5{
6
7template <typename F>
8void visit(ossia::net::node_base& root, F&& f)
9{
10 f(root);
11 for(auto& cld : root.children())
12 {
13 visit(*cld, f);
14 }
15}
16
17template <typename F>
18void visit_parameters(ossia::net::node_base& root, F&& f)
19{
20 if(auto p = root.get_parameter())
21 f(root, *p);
22 for(auto& cld : root.children())
23 {
24 visit_parameters(*cld, f);
25 }
26}
27}
The node_base class.
Definition node.hpp:48