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

A reader over an admitted archive. More...

#include <archive.hpp>

Public Member Functions

 CapsuleArchive (CapsuleArchive &&) noexcept
CapsuleArchive & operator= (CapsuleArchive &&) noexcept
 CapsuleArchive (const CapsuleArchive &)=delete
CapsuleArchive & operator= (const CapsuleArchive &)=delete
 ~CapsuleArchive ()
std::span< const MemberInfo > members () const noexcept
 Members in archive order. The manifest is always index 0.
std::span< const std::uint8_t > manifest_bytes () const noexcept
 The bounded root manifest bytes.
runtime::Result< std::vector< std::uint8_t >, CapsuleError > read (std::string_view path) const
 Expand one member.
std::uint64_t peak_bytes () const noexcept
 Peak bytes charged so far.

Friends

runtime::Result< CapsuleArchive, CapsuleError > open_archive (const std::filesystem::path &path, const CapsuleLimits &limits=kCapsuleLimitsV1)

Detailed Description

A reader over an admitted archive.

Construction validates the container shape — budgets, methods, paths, collisions, manifest position — but does not expand any member and never executes anything.

Constructor & Destructor Documentation

◆ CapsuleArchive() [1/2]

pulp::authoring_capsule::CapsuleArchive::CapsuleArchive ( CapsuleArchive && )
noexcept

◆ CapsuleArchive() [2/2]

pulp::authoring_capsule::CapsuleArchive::CapsuleArchive ( const CapsuleArchive & )
delete

◆ ~CapsuleArchive()

pulp::authoring_capsule::CapsuleArchive::~CapsuleArchive ( )

Member Function Documentation

◆ manifest_bytes()

std::span< const std::uint8_t > pulp::authoring_capsule::CapsuleArchive::manifest_bytes ( ) const
noexcept

The bounded root manifest bytes.

Available without expanding anything else, which is what makes preview cheap and safe.

◆ members()

std::span< const MemberInfo > pulp::authoring_capsule::CapsuleArchive::members ( ) const
noexcept

Members in archive order. The manifest is always index 0.

◆ operator=() [1/2]

CapsuleArchive & pulp::authoring_capsule::CapsuleArchive::operator= ( CapsuleArchive && )
noexcept

◆ operator=() [2/2]

CapsuleArchive & pulp::authoring_capsule::CapsuleArchive::operator= ( const CapsuleArchive & )
delete

◆ peak_bytes()

std::uint64_t pulp::authoring_capsule::CapsuleArchive::peak_bytes ( ) const
noexcept

Peak bytes charged so far.

Reported in receipts so a budget regression is visible rather than inferred.

◆ read()

runtime::Result< std::vector< std::uint8_t >, CapsuleError > pulp::authoring_capsule::CapsuleArchive::read ( std::string_view path) const

Expand one member.

Charges the working-set budget; returns archive_budget_exceeded rather than allocating past it.

◆ open_archive

runtime::Result< CapsuleArchive, CapsuleError > open_archive ( const std::filesystem::path & path,
const CapsuleLimits & limits = kCapsuleLimitsV1 )
friend

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