Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
ui::AXEventGenerator::Iterator Class Reference

#include <ax_event_generator.h>

Inheritance diagram for ui::AXEventGenerator::Iterator:

Public Member Functions

 Iterator (const std::map< AXNode *, std::set< EventParams > > &map, const std::map< AXNode *, std::set< EventParams > >::const_iterator &head)
 
 Iterator (const Iterator &other)
 
 ~Iterator ()
 
bool operator!= (const Iterator &rhs) const
 
Iteratoroperator++ ()
 
TargetedEvent operator* () const
 

Detailed Description

Definition at line 128 of file ax_event_generator.h.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

ui::AXEventGenerator::Iterator::Iterator ( const std::map< AXNode *, std::set< EventParams > > &  map,
const std::map< AXNode *, std::set< EventParams > >::const_iterator head 
)

Definition at line 110 of file ax_event_generator.cc.

113 : map_(map), map_iter_(head) {
114 if (map_iter_ != map.end())
115 set_iter_ = map_iter_->second.begin();
116}
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
Definition: SkVx.h:680

◆ Iterator() [2/2]

ui::AXEventGenerator::Iterator::Iterator ( const Iterator other)
default

◆ ~Iterator()

ui::AXEventGenerator::Iterator::~Iterator ( )
default

Member Function Documentation

◆ operator!=()

bool ui::AXEventGenerator::Iterator::operator!= ( const Iterator rhs) const

Definition at line 123 of file ax_event_generator.cc.

124 {
125 return map_iter_ != rhs.map_iter_ ||
126 (map_iter_ != map_.end() && set_iter_ != rhs.set_iter_);
127}

◆ operator*()

AXEventGenerator::TargetedEvent ui::AXEventGenerator::Iterator::operator* ( ) const

Definition at line 143 of file ax_event_generator.cc.

143 {
144 BASE_DCHECK(map_iter_ != map_.end() && set_iter_ != map_iter_->second.end());
145 return AXEventGenerator::TargetedEvent(map_iter_->first, *set_iter_);
146}
#define BASE_DCHECK(condition)
Definition: logging.h:63

◆ operator++()

AXEventGenerator::Iterator & ui::AXEventGenerator::Iterator::operator++ ( )

Definition at line 129 of file ax_event_generator.cc.

129 {
130 if (map_iter_ == map_.end())
131 return *this;
132
133 set_iter_++;
134 while (map_iter_ != map_.end() && set_iter_ == map_iter_->second.end()) {
135 map_iter_++;
136 if (map_iter_ != map_.end())
137 set_iter_ = map_iter_->second.begin();
138 }
139
140 return *this;
141}

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