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
9namespace zrythm::dsp
10{
14class PortSpan : public utils::UuidIdentifiableObjectView<dsp::PortRegistry>
15{
16public:
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
29static_assert (std::ranges::random_access_range<PortSpan>);
30}
Span that offers helper methods on a range of ports.
Definition port_span.h:15
A unified view over UUID-identified objects that supports: