Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::WriterCapabilityMask Struct Reference

Fixed authority of one writer over command classes and retained size. More...

#include <document_session.hpp>

Public Attributes

std::uint64_t allowed
 One bit per class/intent pair, indexed by capability_bit.
std::size_t max_transaction_retained_bytes = std::numeric_limits<std::size_t>::max()
 Largest retained size a single transaction from this writer may carry.
std::size_t max_session_retained_bytes = std::numeric_limits<std::size_t>::max()
 Largest cumulative retained size this writer may commit to the session.

Detailed Description

Fixed authority of one writer over command classes and retained size.

A default-constructed mask denies every destructive intent and imposes no quota. The no-argument registration overload explicitly uses unrestricted_capabilities() so existing trusted callers retain their prior authority. Quotas use the complete envelope-aware retained_size(const Transaction&) estimate. A commandless End/Cancel may close only the ephemeral gesture lifecycle without document publication, journaling, capability admission, or quota charge.

Member Data Documentation

◆ allowed

std::uint64_t pulp::timeline::WriterCapabilityMask::allowed
Initial value:
= [] {
auto value = kAllCommandAuthorities;
for (std::size_t index = 0; index < kCommandClassCount; ++index)
value &= ~capability_bit(
{static_cast<CommandClass>(index), CommandIntent::Remove});
return value;
}()
constexpr std::size_t kCommandClassCount
Number of distinct command classes.
Definition document_session.hpp:80
constexpr std::uint64_t capability_bit(CommandAuthority authority) noexcept
Returns the single mask bit representing authority.
Definition document_session.hpp:261
CommandClass
The part of the document one command governs.
Definition document_session.hpp:42
constexpr std::uint64_t kAllCommandAuthorities
Every class/intent pair set.
Definition document_session.hpp:268
@ Remove
Takes an existing entity out of the document.
Definition document_session.hpp:92

One bit per class/intent pair, indexed by capability_bit.

◆ max_session_retained_bytes

std::size_t pulp::timeline::WriterCapabilityMask::max_session_retained_bytes = std::numeric_limits<std::size_t>::max()

Largest cumulative retained size this writer may commit to the session.

◆ max_transaction_retained_bytes

std::size_t pulp::timeline::WriterCapabilityMask::max_transaction_retained_bytes = std::numeric_limits<std::size_t>::max()

Largest retained size a single transaction from this writer may carry.


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