OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
graph_edge.hpp
1#pragma once
2#include <ossia/dataflow/connection.hpp>
3#include <ossia/dataflow/typed_value.hpp>
4
5namespace ossia
6{
7struct init_delay_line
8{
9 delay_line_type& delay_line;
10 void operator()(const audio_port&) const noexcept { delay_line = audio_delay_line{}; }
11 void operator()(const value_port&) const noexcept { delay_line = value_delay_line{}; }
12 void operator()(const midi_port&) const noexcept { delay_line = midi_delay_line{}; }
13 void operator()(const geometry_port&) const noexcept
14 {
15 delay_line = geometry_delay_line{};
16 }
17 void operator()() const noexcept { }
18};
19
20class graph_interface;
21/*
22template <typename... Args>
23std::shared_ptr<ossia::graph_edge> make_edge(Args&&... args);
24*/
25// A pure dependency edge does not have in/out ports set
26struct OSSIA_EXPORT graph_edge
27{
28 friend graph_interface;
29 /*
30 template <typename... Args>
31 friend std::shared_ptr<ossia::graph_edge> make_edge(Args&&...);
32*/
33private:
34 graph_edge() = default;
35
36public:
37 graph_edge(
38 connection c, outlet_ptr pout, inlet_ptr pin, node_ptr pout_node,
39 node_ptr pin_node) noexcept;
40 ~graph_edge();
41
42 void init() noexcept;
43 void clear() noexcept;
44
45 static std::size_t size_of_allocated_memory_by_make_shared() noexcept;
46
47 connection con{};
48 outlet_ptr out{};
49 inlet_ptr in{};
50 node_ptr out_node{};
51 node_ptr in_node{};
52};
53/*
54template <typename... Args>
55std::shared_ptr<ossia::graph_edge> make_edge(Args&&... args)
56{
57 return std::shared_ptr<ossia::graph_edge>(
58 new ossia::graph_edge(std::forward<Args>(args)...));
59}
60*/
61}
Definition git_info.h:7