void CN_CONNECTIVITY_ALGO::ForEachAnchor( const std::function<void( CN_ANCHOR& )>& aFunc ) { ForEachItem( [aFunc] ( CN_ITEM& item ) { for( const auto& anchor : item.Anchors() ) aFunc( *anchor ); } ); }
SGNameItem* NameItemIter::ForEach() { PORTNOTETRACE("other","NameItemIter::ForEach - do nothing"); #ifndef EXCLUDE_FROM_XARALX // Just the items in 'Used Names'? if (INT32(m_eMask) & 1) return ForEachItem(NameGallery::Instance()->GetUsedNames()); // Items in all the groups. SGNameGroup* pGroup = NameGallery::Instance()->GetFirstGroup(); while (pGroup != 0) { SGNameGroup* pNextGroup = (SGNameGroup*) pGroup->GetNext(); SGNameItem* pStopItem = ForEachItem(pGroup); if (pStopItem != 0) return pStopItem; pGroup = pNextGroup; } #endif // No item stopped the iteration. return NULL; }