Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::DiagnosticScope Class Reference

Stack-only causal context on one thread; restores the previous scope on every exit. No global recorder is installed: lookups require the same explicitly supplied recorder. Must be destroyed in stack order on the constructing thread, before the recorder. More...

#include <diagnostics.hpp>

Public Member Functions

 DiagnosticScope (Diagnostics *diagnostics, DiagnosticContext context) noexcept
 Install a borrowed context without allocation.
 ~DiagnosticScope ()
 Restore the enclosing context.
 DiagnosticScope (const DiagnosticScope &)=delete
DiagnosticScope & operator= (const DiagnosticScope &)=delete
DiagnosticReason outcome () const noexcept
 Summarize only property evidence observed in this scope.
bool frameRequested () const noexcept
 Inspect actual invalidation evidence in this scope.

Friends

class Diagnostics

Detailed Description

Stack-only causal context on one thread; restores the previous scope on every exit. No global recorder is installed: lookups require the same explicitly supplied recorder. Must be destroyed in stack order on the constructing thread, before the recorder.

Constructor & Destructor Documentation

◆ DiagnosticScope()

portals::DiagnosticScope::DiagnosticScope ( Diagnostics * diagnostics,
DiagnosticContext context )
noexcept

Install a borrowed context without allocation.

Parameters
diagnosticsRecorder that outlives this scope; null/disabled is a no-op.
contextToken issued by that recorder, or empty for an unobserved continuation.

Member Function Documentation

◆ frameRequested()

bool portals::DiagnosticScope::frameRequested ( ) const
noexcept

Inspect actual invalidation evidence in this scope.

Returns
True if a frame request was recorded by an instrumented tree.

◆ outcome()

DiagnosticReason portals::DiagnosticScope::outcome ( ) const
noexcept

Summarize only property evidence observed in this scope.

Returns
VALUE_CHANGED, VALUE_UNCHANGED, or OUTCOME_UNKNOWN; no inference from handler return.

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