Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::SubDocumentAdmission Class Reference

Internal count admission for retained SVG resource graphs. Resource graphs must be idle/serialized during traversal; the mutex protects metadata only. More...

#include "donner/svg/components/resources/SubDocumentAdmission.h"

Classes

struct  Stats
 Family-wide admission observations; entity/payload charges are high-water snapshots. More...
class  Reservation
 Provisional document slots. Destruction refunds slots but not parse attempts. More...

Public Member Functions

std::unique_ptr< Reservation > beginParse () const
 Atomically spend one attempt and reserve one pending document slot per requesting family.
bool admit (const SVGDocumentHandle &document, Reservation *reservation=nullptr) const
 Admit a returned or cached document's bounded, acyclic retained graph.

Static Public Member Functions

static std::shared_ptr< SubDocumentAdmission > Bind (Registry &registry, const SubDocumentCache::Limits &limits)
 Bind a cache to its owning registry and all requesting admission families.
static Stats GetStats (const DocumentResourceFamilyBudget &family)
 Inspect the ledger attached to an existing family without creating one.

Detailed Description

Internal count admission for retained SVG resource graphs. Resource graphs must be idle/serialized during traversal; the mutex protects metadata only.


Class Documentation

◆ donner::svg::components::SubDocumentAdmission::Stats

struct donner::svg::components::SubDocumentAdmission::Stats

Family-wide admission observations; entity/payload charges are high-water snapshots.

Class Members
size_t documents = 0 Retained documents, excluding the original root.
size_t entities = 0 Admitted root and descendant entity snapshots.
size_t parseAttempts = 0 Parser calls, including failed calls; never refunded.
size_t payloadBytes = 0 Admitted parsed-payload snapshots.
size_t pending = 0 Document slots reserved before parser callbacks.
size_t rejections = 0 Refused admission operations.

Member Function Documentation

◆ admit()

bool donner::svg::components::SubDocumentAdmission::admit ( const SVGDocumentHandle & document,
Reservation * reservation = nullptr ) const

Admit a returned or cached document's bounded, acyclic retained graph.

Parameters
documentCandidate.
reservationOptional slots reserved before parsing.

◆ Bind()

std::shared_ptr< SubDocumentAdmission > donner::svg::components::SubDocumentAdmission::Bind ( Registry & registry,
const SubDocumentCache::Limits & limits )
static

Bind a cache to its owning registry and all requesting admission families.

Parameters
registryCache owner.
limitsLocal ceilings that may tighten the family.

◆ GetStats()

Stats donner::svg::components::SubDocumentAdmission::GetStats ( const DocumentResourceFamilyBudget & family)
static

Inspect the ledger attached to an existing family without creating one.

Parameters
familyFamily whose admission counters are requested.

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