Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::host::ProcessorRestoreRegistry Class Reference

Control-thread building block for hosts restoring a set of Processor nodes. More...

#include <processor_restore.hpp>

Public Member Functions

ProcessorRestoreCode register_type (ProcessorRestoreDescriptor descriptor)
ProcessorRestoreResult restore_batch (std::span< const ProcessorRestoreRecord > records, std::span< const ProcessorTypeKey > allowlist) const
 Validates the entire batch and its explicit allowlist before executing factories; constructs and checks all identities before restoring either payload.

Static Public Attributes

static constexpr std::size_t max_nodes = 4096
static constexpr std::size_t max_state_part_bytes = 8 * 1024 * 1024
static constexpr std::size_t max_total_state_bytes = 32 * 1024 * 1024

Detailed Description

Control-thread building block for hosts restoring a set of Processor nodes.

Descriptors cannot be replaced or removed. Finish registration before use; concurrent registration, restoration, or factory reentry is unsupported.

This is NOT a graph-file loader or a live graph transaction: it does not capture state, parse JSON/base64, migrate, prepare, validate graph edges, or publish. GraphSerializer owns the v4 file envelope; applications can add a successful batch to an isolated candidate via add_processor_node(). A later failure must discard that candidate without changing the live graph.

Member Function Documentation

◆ register_type()

ProcessorRestoreCode pulp::host::ProcessorRestoreRegistry::register_type ( ProcessorRestoreDescriptor descriptor)

◆ restore_batch()

ProcessorRestoreResult pulp::host::ProcessorRestoreRegistry::restore_batch ( std::span< const ProcessorRestoreRecord > records,
std::span< const ProcessorTypeKey > allowlist ) const

Validates the entire batch and its explicit allowlist before executing factories; constructs and checks all identities before restoring either payload.

StateStore is bound by ProcessorNodeInstance::create(). Both restore calls must succeed. Failed candidates die here, off the audio thread. Trusted callbacks must not mutate external/live state themselves.

Member Data Documentation

◆ max_nodes

std::size_t pulp::host::ProcessorRestoreRegistry::max_nodes = 4096
staticconstexpr

◆ max_state_part_bytes

std::size_t pulp::host::ProcessorRestoreRegistry::max_state_part_bytes = 8 * 1024 * 1024
staticconstexpr

◆ max_total_state_bytes

std::size_t pulp::host::ProcessorRestoreRegistry::max_total_state_bytes = 32 * 1024 * 1024
staticconstexpr

The documentation for this class was generated from the following file: