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
4
namespace
ossia::net
5
{
6
7
template
<
typename
F>
8
void
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
17
template
<
typename
F>
18
void
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
}
ossia::net::node_base
The node_base class.
Definition
node.hpp:48
src
ossia
network
common
node_visitor.hpp
Generated on Mon Mar 31 2025 23:58:28 for OSSIA by
1.9.8