|
ESPHome 2025.12.6
|
Optimized lambda filter for stateless lambdas (no capture). More...
#include <filter.h>
Public Member Functions | |
| StatelessLambdaFilter (optional< std::string >(*lambda_filter)(std::string)) | |
| optional< std::string > | new_value (std::string value) override |
Public Member Functions inherited from esphome::text_sensor::Filter | |
| virtual void | initialize (TextSensor *parent, Filter *next) |
| Initialize this filter, please note this can be called more than once. | |
| void | input (const std::string &value) |
| void | output (const std::string &value) |
Protected Attributes | |
| optional< std::string >(* | lambda_filter_ )(std::string) |
Protected Attributes inherited from esphome::text_sensor::Filter | |
| friend | TextSensor |
| Filter * | next_ {nullptr} |
| TextSensor * | parent_ {nullptr} |
Optimized lambda filter 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).
|
inlineexplicit |
|
inlineoverridevirtual |
Implements esphome::text_sensor::Filter.
|
protected |