Flutter Engine
The Flutter Engine
Public Member Functions | Protected Attributes | List of all members
ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > Class Template Reference

#include <ax_node.h>

Public Member Functions

 ChildIteratorBase (const NodeType *parent, NodeType *child)
 
 ChildIteratorBase (const ChildIteratorBase &it)
 
 ~ChildIteratorBase ()
 
bool operator== (const ChildIteratorBase &rhs) const
 
bool operator!= (const ChildIteratorBase &rhs) const
 
ChildIteratorBaseoperator++ ()
 
ChildIteratorBaseoperator-- ()
 
NodeType * get () const
 
NodeType & operator* () const
 
NodeType * operator-> () const
 

Protected Attributes

const NodeType * parent_
 
NodeType * child_
 

Detailed Description

template<typename NodeType, NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
class ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >

Definition at line 79 of file ax_node.h.

Constructor & Destructor Documentation

◆ ChildIteratorBase() [1/2]

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::ChildIteratorBase ( const NodeType *  parent,
NodeType *  child 
)

Definition at line 485 of file ax_node.h.

487 : parent_(parent), child_(child) {}
const NodeType * parent_
Definition: ax_node.h:93
AXNode * parent() const
Definition: ax_node.h:111

◆ ChildIteratorBase() [2/2]

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::ChildIteratorBase ( const ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > &  it)

Definition at line 498 of file ax_node.h.

500 : parent_(it.parent_), child_(it.child_) {}

◆ ~ChildIteratorBase()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::~ChildIteratorBase ( )
inline

Definition at line 83 of file ax_node.h.

83{}

Member Function Documentation

◆ get()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
NodeType * ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::get ( ) const

Definition at line 597 of file ax_node.h.

597 {
599 return child_;
600}
#define BASE_DCHECK(condition)
Definition: logging.h:63

◆ operator!=()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
bool ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator!= ( const ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > &  rhs) const

Definition at line 525 of file ax_node.h.

526 {
527 return parent_ != rhs.parent_ || child_ != rhs.child_;
528}

◆ operator*()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
NodeType & ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator* ( ) const

Definition at line 611 of file ax_node.h.

611 {
613 return *child_;
614}

◆ operator++()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > & ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator++ ( )

Definition at line 544 of file ax_node.h.

544 {
545 // |child_ = nullptr| denotes the iterator's past-the-end condition. When we
546 // increment the iterator past the end, we remain at the past-the-end iterator
547 // condition.
548 if (child_ && parent_) {
549 if (child_ == (parent_->*LastChild)())
550 child_ = nullptr;
551 else
552 child_ = (child_->*NextSibling)();
553 }
554
555 return *this;
556}

◆ operator--()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > & ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator-- ( )

Definition at line 572 of file ax_node.h.

572 {
573 if (parent_) {
574 // If the iterator is past the end, |child_=nullptr|, decrement the iterator
575 // gives us the last iterator element.
576 if (!child_)
577 child_ = (parent_->*LastChild)();
578 // Decrement the iterator gives us the previous element, except when the
579 // iterator is at the beginning; in which case, decrementing the iterator
580 // remains at the beginning.
581 else if (child_ != (parent_->*FirstChild)())
582 child_ = (child_->*PreviousSibling)();
583 }
584
585 return *this;
586}

◆ operator->()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
NodeType * ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator-> ( ) const

Definition at line 625 of file ax_node.h.

625 {
627 return child_;
628}

◆ operator==()

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
bool ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::operator== ( const ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild > &  rhs) const

Definition at line 511 of file ax_node.h.

512 {
513 return parent_ == rhs.parent_ && child_ == rhs.child_;
514}

Member Data Documentation

◆ child_

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
NodeType* ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::child_
protected

Definition at line 94 of file ax_node.h.

◆ parent_

template<typename NodeType , NodeType *(NodeType::*)() const NextSibling, NodeType *(NodeType::*)() const PreviousSibling, NodeType *(NodeType::*)() const FirstChild, NodeType *(NodeType::*)() const LastChild>
const NodeType* ui::AXNode::ChildIteratorBase< NodeType, NextSibling, PreviousSibling, FirstChild, LastChild >::parent_
protected

Definition at line 93 of file ax_node.h.


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