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

RAII attachment. More...

#include <trace_session.hpp>

Public Member Functions

 ScopedTracingAttachment ()
 ScopedTracingAttachment (const ScopedTracingAttachment &)=delete
ScopedTracingAttachment & operator= (const ScopedTracingAttachment &)=delete
 ScopedTracingAttachment (ScopedTracingAttachment &&other) noexcept
ScopedTracingAttachment & operator= (ScopedTracingAttachment &&other) noexcept
 ~ScopedTracingAttachment ()
void reset () noexcept
 Detach early. Idempotent.
bool attached () const noexcept

Detailed Description

RAII attachment.

Construct one per plug-in instance / app that wants tracing alive for its lifetime; the last one destroyed flushes the trace.

Exists because the balance is easy to get wrong in exactly the place it matters most: an adapter that returns early from its destroy path leaks an attachment, and the trace is then never flushed — the capture silently produces an empty file and the session looks like it "did not record". Move-only, so an accidental copy cannot double-detach.

Constructor & Destructor Documentation

◆ ScopedTracingAttachment() [1/3]

pulp::runtime::ScopedTracingAttachment::ScopedTracingAttachment ( )
inline

◆ ScopedTracingAttachment() [2/3]

pulp::runtime::ScopedTracingAttachment::ScopedTracingAttachment ( const ScopedTracingAttachment & )
delete

◆ ScopedTracingAttachment() [3/3]

pulp::runtime::ScopedTracingAttachment::ScopedTracingAttachment ( ScopedTracingAttachment && other)
inlinenoexcept

◆ ~ScopedTracingAttachment()

pulp::runtime::ScopedTracingAttachment::~ScopedTracingAttachment ( )
inline

Member Function Documentation

◆ attached()

bool pulp::runtime::ScopedTracingAttachment::attached ( ) const
inlinenoexcept

◆ operator=() [1/2]

ScopedTracingAttachment & pulp::runtime::ScopedTracingAttachment::operator= ( const ScopedTracingAttachment & )
delete

◆ operator=() [2/2]

ScopedTracingAttachment & pulp::runtime::ScopedTracingAttachment::operator= ( ScopedTracingAttachment && other)
inlinenoexcept

◆ reset()

void pulp::runtime::ScopedTracingAttachment::reset ( )
inlinenoexcept

Detach early. Idempotent.


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