ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::select::SelectTraits Class Reference

#include <select_traits.h>

Public Member Functions

 SelectTraits ()=default
 
 SelectTraits (const SelectTraits &)=delete
 
SelectTraits & operator= (const SelectTraits &)=delete
 
void set_options_static (const char *const *options, size_t count)
 Codegen only: points at a table that outlives the select.
 
void set_options (const SelectOptions &options)
 Runtime lists: the pointer list is copied, as before; the strings must still outlive the select.
 
void set_options (const std::initializer_list< const char * > &options)
 
void set_options (const FixedVector< const char * > &options)
 
const SelectOptions & get_options () const
 

Protected Member Functions

void set_options_copy_ (const char *const *options, size_t count)
 

Protected Attributes

SelectOptions options_
 

Detailed Description

Definition at line 11 of file select_traits.h.

Constructor & Destructor Documentation

◆ SelectTraits() [1/2]

esphome::select::SelectTraits::SelectTraits ( )
default

◆ SelectTraits() [2/2]

esphome::select::SelectTraits::SelectTraits ( const SelectTraits & )
delete

Member Function Documentation

◆ get_options()

const SelectOptions & esphome::select::SelectTraits::get_options ( ) const
inline

Definition at line 24 of file select_traits.h.

◆ operator=()

SelectTraits & esphome::select::SelectTraits::operator= ( const SelectTraits & )
delete

◆ set_options() [1/3]

void esphome::select::SelectTraits::set_options ( const FixedVector< const char * > & options)

Definition at line 15 of file select_traits.cpp.

◆ set_options() [2/3]

void esphome::select::SelectTraits::set_options ( const SelectOptions & options)
inline

Runtime lists: the pointer list is copied, as before; the strings must still outlive the select.

Definition at line 21 of file select_traits.h.

◆ set_options() [3/3]

void esphome::select::SelectTraits::set_options ( const std::initializer_list< const char * > & options)

Definition at line 11 of file select_traits.cpp.

◆ set_options_copy_()

void esphome::select::SelectTraits::set_options_copy_ ( const char *const * options,
size_t count )
protected

Definition at line 7 of file select_traits.cpp.

◆ set_options_static()

void esphome::select::SelectTraits::set_options_static ( const char *const * options,
size_t count )
inline

Codegen only: points at a table that outlives the select.

Call before any runtime set_options; it does not free a previous copy (generated setup() runs before any lambda or automation).

Definition at line 19 of file select_traits.h.

Field Documentation

◆ options_

SelectOptions esphome::select::SelectTraits::options_
protected

Definition at line 29 of file select_traits.h.


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