OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
connection.hpp
1#pragma once
2#include <ossia/dataflow/audio_port.hpp>
3#include <ossia/dataflow/dataflow_fwd.hpp>
4#include <ossia/dataflow/geometry_port.hpp>
5#include <ossia/dataflow/midi_port.hpp>
6#include <ossia/dataflow/value_port.hpp>
7#include <ossia/detail/nullable_variant.hpp>
8
9namespace ossia
10{
11
12struct immediate_glutton_connection
13{
14};
15struct immediate_strict_connection
16{
17 enum required_sides_t
18 {
19 inbound = 1 << 0,
20 outbound = 1 << 1,
21 both = inbound | outbound
22 };
23
24 required_sides_t required_sides{both};
25};
26
27struct delayed_glutton_connection
28{
29 // delayed at the source or at the target
30 delay_line_type buffer;
31 std::size_t pos{};
32};
33struct delayed_strict_connection
34{
35 // same
36 delay_line_type buffer;
37 std::size_t pos{};
38};
39
40// An explicit dependency
41struct dependency_connection
42{
43};
44
45struct connection
46 : ossia::nullable_variant<
47 immediate_glutton_connection, immediate_strict_connection,
48 delayed_glutton_connection, delayed_strict_connection, dependency_connection>
49{
50 using nullable_variant::nullable_variant;
51 connection() noexcept = default;
52 ~connection() = default;
53 connection(const connection&) = default;
54 connection(connection&&) noexcept = default;
55 connection& operator=(const connection&) = default;
56 connection& operator=(connection&&) noexcept = default;
57 connection(immediate_glutton_connection c) noexcept: nullable_variant{c} { }
58 connection(immediate_strict_connection c) noexcept: nullable_variant{c} { }
59 connection(delayed_glutton_connection&& c) noexcept: nullable_variant{std::move(c)} { }
60 connection(delayed_strict_connection&& c) noexcept: nullable_variant{std::move(c)} { }
61 connection(const delayed_glutton_connection& c) noexcept: nullable_variant{c} { }
62 connection(const delayed_strict_connection& c) noexcept: nullable_variant{c} { }
63 connection(dependency_connection c) noexcept: nullable_variant{c} { }
64};
65}
Definition git_info.h:7