ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::mqtt::DispatchGuard Class Reference

Sets a flag for the guard's scope and restores its previous value on exit. More...

#include <mqtt_backend.h>

Public Member Functions

 DispatchGuard (bool &flag)
 
 ~DispatchGuard ()
 
 DispatchGuard (const DispatchGuard &)=delete
 
DispatchGuard & operator= (const DispatchGuard &)=delete
 

Protected Attributes

bool & flag_
 
bool previous_
 

Detailed Description

Sets a flag for the guard's scope and restores its previous value on exit.

Definition at line 31 of file mqtt_backend.h.

Constructor & Destructor Documentation

◆ DispatchGuard() [1/2]

esphome::mqtt::DispatchGuard::DispatchGuard ( bool & flag)
inlineexplicit

Definition at line 33 of file mqtt_backend.h.

◆ ~DispatchGuard()

esphome::mqtt::DispatchGuard::~DispatchGuard ( )
inline

Definition at line 34 of file mqtt_backend.h.

◆ DispatchGuard() [2/2]

esphome::mqtt::DispatchGuard::DispatchGuard ( const DispatchGuard & )
delete

Member Function Documentation

◆ operator=()

DispatchGuard & esphome::mqtt::DispatchGuard::operator= ( const DispatchGuard & )
delete

Field Documentation

◆ flag_

bool& esphome::mqtt::DispatchGuard::flag_
protected

Definition at line 39 of file mqtt_backend.h.

◆ previous_

bool esphome::mqtt::DispatchGuard::previous_
protected

Definition at line 40 of file mqtt_backend.h.


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