|
ESPHome 2025.12.0-dev
|
Optimized lambda condition for stateless lambdas (no capture). More...
#include <base_automation.h>
Public Member Functions | |
| StatelessLambdaCondition (bool(*f)(Ts...)) | |
| bool | check (const Ts &...x) override |
Public Member Functions inherited from esphome::Condition< Ts... > | |
| bool | check_tuple (const std::tuple< Ts... > &tuple) |
| Call check with a tuple of values as parameter. | |
Protected Attributes | |
| bool(* | f_ )(Ts...) |
Additional Inherited Members | |
Protected Member Functions inherited from esphome::Condition< Ts... > | |
| bool | check_tuple_ (const std::tuple< Ts... > &tuple, seq< S... >) |
Optimized lambda condition for stateless lambdas (no capture).
Uses function pointer instead of std::function to reduce memory overhead. Memory: 4 bytes (function pointer on 32-bit) vs 32 bytes (std::function).
Definition at line 86 of file base_automation.h.
|
inlineexplicit |
Definition at line 88 of file base_automation.h.
|
inlineoverridevirtual |
Implements esphome::Condition< Ts... >.
Definition at line 89 of file base_automation.h.
|
protected |
Definition at line 92 of file base_automation.h.