MCPcopy Create free account
hub / github.com/comaps/comaps / ForEachInSubtree

Method ForEachInSubtree

libs/storage/storage.hpp:741–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739
740template <class ToDo>
741void Storage::ForEachInSubtree(CountryId const & root, ToDo && toDo) const
742{
743 CountryTree::Node const * const rootNode = m_countries.FindFirst(root);
744 if (rootNode == nullptr)
745 {
746 ASSERT(false, ("CountryId =", root, "not found in m_countries."));
747 return;
748 }
749 rootNode->ForEachInSubtree([&toDo](CountryTree::Node const & node)
750 {
751 Country const & value = node.Value();
752 toDo(value.Name(), value.GetSubtreeMwmCounter() != 1 /* groupNode. */);
753 });
754}
755
756/// Calls functor |toDo| with signature
757/// void(const CountryId const & parentId, CountriesVec const & descendantCountryId)

Callers 13

LoadMethod · 0.45
LocalitiesSourceMethod · 0.45
GetNumDocsMethod · 0.45
GetTopLocalitiesMethod · 0.45
DownloadNodeMethod · 0.45
DeleteNodeMethod · 0.45
GetNodeAttrsMethod · 0.45
GetUpdateInfoMethod · 0.45
CalcLimitRectFunction · 0.45
ForEachCountryMethod · 0.45
DownloadGroupFunction · 0.45
UNIT_TESTFunction · 0.45

Calls 5

ASSERTFunction · 0.85
FindFirstMethod · 0.80
GetSubtreeMwmCounterMethod · 0.80
ValueMethod · 0.45
NameMethod · 0.45

Tested by 3

GetTopLocalitiesMethod · 0.36
DownloadGroupFunction · 0.36
UNIT_TESTFunction · 0.36