Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
port_span.h
1
// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include "dsp/port_all.h"
7
#include "utils/uuid_identifiable_object.h"
8
9
namespace
zrythm::dsp
10
{
14
class
PortSpan
:
public
utils::UuidIdentifiableObjectView
<dsp::PortRegistry>
15
{
16
public
:
17
using
Base =
utils::UuidIdentifiableObjectView<dsp::PortRegistry>
;
18
using
VariantType =
typename
Base::VariantType;
19
using
PortUuid =
typename
Base::UuidType;
20
using
Base::Base;
// Inherit constructors
21
22
static
auto
label_projection (
const
VariantType &port_var)
23
{
24
return
std::visit (
25
[] (
const
auto
&port) {
return
port->get_label (); }, port_var);
26
}
27
};
28
29
static_assert
(std::ranges::random_access_range<PortSpan>);
30
}
zrythm::dsp::PortSpan
Span that offers helper methods on a range of ports.
Definition
port_span.h:15
zrythm::utils::UuidIdentifiableObjectView
A unified view over UUID-identified objects that supports:
Definition
uuid_identifiable_object.h:721
src
dsp
port_span.h
Generated by
1.15.0