2#include <ossia/dataflow/dataflow_fwd.hpp>
3#include <ossia/network/base/node.hpp>
4#include <ossia/network/common/path.hpp>
10struct exec_state_facade;
11struct do_nothing_for_nodes
13 void operator()(ossia::net::node_base* node,
bool)
const noexcept { }
16template <
typename Fun,
typename NodeFun,
typename DeviceList_T>
17bool apply_to_destination(
18 const destination_t& address,
const DeviceList_T& devices, Fun f, NodeFun nf)
20 switch(address.which().index())
23 case destination_t::index_of<ossia::net::parameter_base*>().index(): {
24 f(*address.target<ossia::net::parameter_base*>(),
true);
29 case destination_t::index_of<ossia::traversal::path>().index(): {
30 std::vector<ossia::net::node_base*> roots{};
33 roots.push_back(&n->get_root_node());
35 auto& p = *address.target<ossia::traversal::path>();
36 ossia::traversal::apply(p, roots);
38 const bool unique = roots.size() == 1;
40 if(
auto addr = n->get_parameter())
48 case destination_t::index_of<ossia::net::node_base*>().index(): {
49 nf(*address.target<ossia::net::node_base*>(),
true);
58std::vector<ossia::net::node_base*> list_destinations(
59 const destination_t& address,
60 const ossia::small_vector<ossia::net::device_base*, 4>& devices);
62ossia::net::node_base* get_first_destination(
63 const destination_t& address,
64 const ossia::small_vector<ossia::net::device_base*, 4>& devices);