ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
esphome::ComponentIterator Class Reference

#include <component_iterator.h>

Inheritance diagram for esphome::ComponentIterator:
esphome::api::InitialStateIterator esphome::api::ListEntitiesIterator esphome::web_server::ListEntitiesIterator

Public Member Functions

void begin (bool include_internal=false)
 
void advance ()
 
bool completed () const
 
virtual bool on_begin ()
 
virtual bool on_service (api::UserServiceDescriptor *service)
 
virtual bool on_camera (camera::Camera *camera)
 
virtual bool on_end ()
 

Protected Types

enum class  IteratorState : uint8_t {
  NONE = 0 , BEGIN , ENTITY_TYPE_ , ENTITY_CONTROLLER_TYPE_ ,
  SERVICE , CAMERA , MAX
}
 

Protected Member Functions

template<typename Container >
void process_platform_item_ (const Container &items, bool(ComponentIterator::*on_item)(typename Container::value_type))
 
void advance_platform_ ()
 

Protected Attributes

uint16_t at_ {0}
 
IteratorState state_ {IteratorState::NONE}
 
bool include_internal_ {false}
 

Detailed Description

Definition at line 25 of file component_iterator.h.

Member Enumeration Documentation

◆ IteratorState

enum class esphome::ComponentIterator::IteratorState : uint8_t
strongprotected
Enumerator
NONE 
BEGIN 
ENTITY_TYPE_ 
ENTITY_CONTROLLER_TYPE_ 
SERVICE 
CAMERA 
MAX 

Definition at line 52 of file component_iterator.h.

Member Function Documentation

◆ advance()

void esphome::ComponentIterator::advance ( )

Definition at line 25 of file component_iterator.cpp.

◆ advance_platform_()

void esphome::ComponentIterator::advance_platform_ ( )
protected

Definition at line 20 of file component_iterator.cpp.

◆ begin()

void esphome::ComponentIterator::begin ( bool include_internal = false)

Definition at line 14 of file component_iterator.cpp.

◆ completed()

bool esphome::ComponentIterator::completed ( ) const
inline

Definition at line 29 of file component_iterator.h.

◆ on_begin()

bool esphome::ComponentIterator::on_begin ( )
virtual

Definition at line 74 of file component_iterator.cpp.

◆ on_camera()

bool esphome::ComponentIterator::on_camera ( camera::Camera * camera)
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 79 of file component_iterator.cpp.

◆ on_end()

bool esphome::ComponentIterator::on_end ( )
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 73 of file component_iterator.cpp.

◆ on_service()

bool esphome::ComponentIterator::on_service ( api::UserServiceDescriptor * service)
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 76 of file component_iterator.cpp.

◆ process_platform_item_()

template<typename Container >
void esphome::ComponentIterator::process_platform_item_ ( const Container & items,
bool(ComponentIterator::* on_item )(typename Container::value_type) )
inlineprotected

Definition at line 76 of file component_iterator.h.

Field Documentation

◆ at_

uint16_t esphome::ComponentIterator::at_ {0}
protected

Definition at line 71 of file component_iterator.h.

◆ include_internal_

bool esphome::ComponentIterator::include_internal_ {false}
protected

Definition at line 73 of file component_iterator.h.

◆ state_

IteratorState esphome::ComponentIterator::state_ {IteratorState::NONE}
protected

Definition at line 72 of file component_iterator.h.


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