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 |
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.
|
inline |
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
Detach early. Idempotent.