Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
ui::AXTree::OrderedSetItemsMap Struct Reference

Public Member Functions

 OrderedSetItemsMap ()=default
 
 ~OrderedSetItemsMap ()=default
 
bool HierarchicalLevelExists (std::optional< int > level)
 
void Add (std::optional< int > level, const OrderedSetContent &ordered_set_content)
 
void AddItemToBack (std::optional< int > level, const AXNode *item)
 
OrderedSetContentGetFirstOrderedSetContent ()
 
void Clear ()
 

Public Attributes

std::map< std::optional< int32_t >, std::vector< OrderedSetContent > > items_map_
 

Detailed Description

Definition at line 626 of file ax_tree.cc.

Constructor & Destructor Documentation

◆ OrderedSetItemsMap()

ui::AXTree::OrderedSetItemsMap::OrderedSetItemsMap ( )
default

◆ ~OrderedSetItemsMap()

ui::AXTree::OrderedSetItemsMap::~OrderedSetItemsMap ( )
default

Member Function Documentation

◆ Add()

void ui::AXTree::OrderedSetItemsMap::Add ( std::optional< int level,
const OrderedSetContent ordered_set_content 
)
inline

Definition at line 639 of file ax_tree.cc.

640 {
642 items_map_[level] = std::vector<OrderedSetContent>();
643
644 items_map_[level].push_back(ordered_set_content);
645 }
std::map< std::optional< int32_t >, std::vector< OrderedSetContent > > items_map_
Definition: ax_tree.cc:681
bool HierarchicalLevelExists(std::optional< int > level)
Definition: ax_tree.cc:631

◆ AddItemToBack()

void ui::AXTree::OrderedSetItemsMap::AddItemToBack ( std::optional< int level,
const AXNode item 
)
inline

Definition at line 654 of file ax_tree.cc.

654 {
656 return;
657
658 std::vector<OrderedSetContent>& sets_list = items_map_[level];
659 if (!sets_list.empty()) {
660 OrderedSetContent& ordered_set_content = sets_list.back();
661 ordered_set_content.set_items_.push_back(item);
662 }
663 }

◆ Clear()

void ui::AXTree::OrderedSetItemsMap::Clear ( )
inline

Definition at line 678 of file ax_tree.cc.

678{ items_map_.clear(); }

◆ GetFirstOrderedSetContent()

OrderedSetContent * ui::AXTree::OrderedSetItemsMap::GetFirstOrderedSetContent ( )
inline

Definition at line 666 of file ax_tree.cc.

666 {
667 if (items_map_.empty())
668 return nullptr;
669
670 std::vector<OrderedSetContent>& sets_list = items_map_.begin()->second;
671 if (sets_list.empty())
672 return nullptr;
673
674 return &(sets_list.front());
675 }

◆ HierarchicalLevelExists()

bool ui::AXTree::OrderedSetItemsMap::HierarchicalLevelExists ( std::optional< int level)
inline

Definition at line 631 of file ax_tree.cc.

631 {
632 if (items_map_.find(level) == items_map_.end())
633 return false;
634 return true;
635 }

Member Data Documentation

◆ items_map_

std::map<std::optional<int32_t>, std::vector<OrderedSetContent> > ui::AXTree::OrderedSetItemsMap::items_map_

Definition at line 681 of file ax_tree.cc.


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