ESPHome 2025.12.0-dev
Loading...
Searching...
No Matches
esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator Class Reference

Iterator support for range-based for loops and API encoding Iterates over set bits and converts bit positions to values Optimization: removes bits from mask as we iterate. More...

#include <finite_set_mask.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = ValueType
 
using difference_type = std::ptrdiff_t
 
using pointer = const ValueType *
 
using reference = ValueType
 

Public Member Functions

constexpr Iterator (bitmask_t mask)
 
constexpr ValueType operator* () const
 
constexpr Iteratoroperator++ ()
 
constexpr bool operator== (const Iterator &other) const
 
constexpr bool operator!= (const Iterator &other) const
 

Detailed Description

template<typename ValueType, typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
class esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator

Iterator support for range-based for loops and API encoding Iterates over set bits and converts bit positions to values Optimization: removes bits from mask as we iterate.

Definition at line 110 of file finite_set_mask.h.

Member Typedef Documentation

◆ difference_type

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
using esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::difference_type = std::ptrdiff_t

Definition at line 114 of file finite_set_mask.h.

◆ iterator_category

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
using esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::iterator_category = std::forward_iterator_tag

Definition at line 112 of file finite_set_mask.h.

◆ pointer

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
using esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::pointer = const ValueType *

Definition at line 115 of file finite_set_mask.h.

◆ reference

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
using esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::reference = ValueType

Definition at line 116 of file finite_set_mask.h.

◆ value_type

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
using esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::value_type = ValueType

Definition at line 113 of file finite_set_mask.h.

Constructor & Destructor Documentation

◆ Iterator()

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::Iterator ( bitmask_t mask)
inlineexplicitconstexpr

Definition at line 118 of file finite_set_mask.h.

Member Function Documentation

◆ operator!=()

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
bool esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::operator!= ( const Iterator & other) const
inlineconstexpr

Definition at line 133 of file finite_set_mask.h.

◆ operator*()

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
ValueType esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::operator* ( ) const
inlineconstexpr

Definition at line 120 of file finite_set_mask.h.

◆ operator++()

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
Iterator & esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::operator++ ( )
inlineconstexpr

Definition at line 125 of file finite_set_mask.h.

◆ operator==()

template<typename ValueType , typename BitPolicy = DefaultBitPolicy<ValueType, 16>>
bool esphome::FiniteSetMask< ValueType, BitPolicy >::Iterator::operator== ( const Iterator & other) const
inlineconstexpr

Definition at line 131 of file finite_set_mask.h.


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