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

A format-bound byte writer that can only be invoked by run_export. More...

#include <export_plan.hpp>

Public Types

using Function

Public Member Functions

 FormatBoundExportWriter ()=default
 FormatBoundExportWriter (Format format, Function function)
 operator bool () const noexcept
Format format () const noexcept

Friends

runtime::Result< ExportArtifacts, ExportError > run_export (const ExportPlan &plan, const ExportOptions &options, const FormatBoundExportWriter &writer)
 Execute through a format-bound writer.

Detailed Description

A format-bound byte writer that can only be invoked by run_export.

Binding the format prevents a plan for one format from authorizing bytes produced by another. Keeping invocation private preserves the plan -> consent -> write sequence mechanically: callers can choose or pass a writer, but cannot execute its callable directly.

Member Typedef Documentation

◆ Function

Initial value:
std::function<runtime::Result<ExportArtifacts, ExportError>(const ExportPlan&)>
A document measured against one format's capability table: what survives, and what it costs.
Definition export_plan.hpp:68

Constructor & Destructor Documentation

◆ FormatBoundExportWriter() [1/2]

pulp::interchange::FormatBoundExportWriter::FormatBoundExportWriter ( )
default

◆ FormatBoundExportWriter() [2/2]

pulp::interchange::FormatBoundExportWriter::FormatBoundExportWriter ( Format format,
Function function )
inline

Member Function Documentation

◆ format()

Format pulp::interchange::FormatBoundExportWriter::format ( ) const
inlinenoexcept

◆ operator bool()

pulp::interchange::FormatBoundExportWriter::operator bool ( ) const
inlineexplicitnoexcept

◆ run_export

runtime::Result< ExportArtifacts, ExportError > run_export ( const ExportPlan & plan,
const ExportOptions & options,
const FormatBoundExportWriter & writer )
friend

Execute through a format-bound writer.

New adapters should expose this overload so a plan for one format cannot authorize another format's bytes.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/interchange/include/pulp/interchange/export_plan.hpp