2#include <ossia/dataflow/graph_node.hpp>
3#include <ossia/dataflow/port.hpp>
7class dummy_node :
public ossia::graph_node
10 dummy_node() =
default;
12 void run(
const token_request& t, exec_state_facade)
noexcept override { }
13 std::string label() const noexcept
override {
return "dummy"; }
16class dummy_audio_node :
public ossia::graph_node
21 m_inlets.push_back(
new ossia::audio_inlet);
22 m_outlets.push_back(
new ossia::audio_outlet);
25 void run(
const token_request& t, exec_state_facade)
noexcept override
27 auto& i = *m_inlets[0]->target<ossia::audio_port>();
28 auto& o = *m_outlets[0]->target<ossia::audio_port>();
31 std::string label() const noexcept
override {
return "dummy_audio_node"; }
34class dummy_midi_node :
public ossia::graph_node
39 m_inlets.push_back(
new ossia::midi_inlet);
40 m_outlets.push_back(
new ossia::midi_outlet);
43 void run(
const token_request& t, exec_state_facade)
noexcept override
45 auto i = m_inlets[0]->target<ossia::midi_port>();
46 auto o = m_outlets[0]->target<ossia::midi_port>();
47 o->messages = i->messages;
49 std::string label() const noexcept
override {
return "dummy_midi_node"; }
52class dummy_value_node :
public ossia::graph_node
57 m_inlets.push_back(
new ossia::value_inlet);
58 m_outlets.push_back(
new ossia::value_outlet);
61 void run(
const token_request& t, exec_state_facade)
noexcept override
63 auto i = m_inlets[0]->target<ossia::value_port>();
64 auto o = m_outlets[0]->target<ossia::value_port>();
65 o->set_data(i->get_data());
67 std::string label() const noexcept
override {
return "dummy_value_node"; }