ESPHome 2026.6.2
Loading...
Searching...
No Matches
esphome::ScopedSourceGuard Class Reference

RAII guard that publishes a current source (e.g. More...

#include <application.h>

Public Member Functions

 ScopedSourceGuard (const LogString *source)
 
 ~ScopedSourceGuard ()
 
 ScopedSourceGuard (const ScopedSourceGuard &)=delete
 
ScopedSourceGuardoperator= (const ScopedSourceGuard &)=delete
 

Detailed Description

RAII guard that publishes a current source (e.g.

a script name) for a scope and restores the previous value on exit, attributing deferred work scheduled inside to that source.

Definition at line 573 of file application.h.

Constructor & Destructor Documentation

◆ ScopedSourceGuard() [1/2]

esphome::ScopedSourceGuard::ScopedSourceGuard ( const LogString * source)
inlineexplicit

Definition at line 575 of file application.h.

◆ ~ScopedSourceGuard()

esphome::ScopedSourceGuard::~ScopedSourceGuard ( )
inline

Definition at line 578 of file application.h.

◆ ScopedSourceGuard() [2/2]

esphome::ScopedSourceGuard::ScopedSourceGuard ( const ScopedSourceGuard & )
delete

Member Function Documentation

◆ operator=()

ScopedSourceGuard & esphome::ScopedSourceGuard::operator= ( const ScopedSourceGuard & )
delete

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