Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
signal_graph_authoring.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace pulp::host {
6
7// A control-side receipt for the graph's authoring state. `graph_identity`
8// identifies one SignalGraph lifetime and is deliberately process-local;
9// `generation` advances whenever authoring state changes, including a clear()
10// that may recycle compact NodeIds. Consumers can retain a receipt while
11// preparing an imported change and reject it if another control-side writer
12// changed the graph before the change is committed. The receipt never enters
13// the audio callback or the serialized .pulpgraph format.
15 std::uint64_t graph_identity = 0;
16 std::uint64_t generation = 0;
17
18 bool valid() const noexcept {
19 return graph_identity != 0;
20 }
21
22 friend bool operator==(const GraphAuthoringReceipt&, const GraphAuthoringReceipt&) = default;
23};
24
30
31} // namespace pulp::host
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
GraphAuthoringReceiptStatus
Definition signal_graph_authoring.hpp:25
@ Current
Definition signal_graph_authoring.hpp:26
@ WrongGraph
Definition signal_graph_authoring.hpp:27
@ Stale
Definition signal_graph_authoring.hpp:28
Definition signal_graph_authoring.hpp:14
std::uint64_t graph_identity
Definition signal_graph_authoring.hpp:15
bool valid() const noexcept
Definition signal_graph_authoring.hpp:18
std::uint64_t generation
Definition signal_graph_authoring.hpp:16
friend bool operator==(const GraphAuthoringReceipt &, const GraphAuthoringReceipt &)=default