MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / ForEachAddOnConst

Method ForEachAddOnConst

Source/Flow/Private/Nodes/FlowNodeBase.cpp:414–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412#endif // WITH_EDITOR
413
414EFlowForEachAddOnFunctionReturnValue UFlowNodeBase::ForEachAddOnConst(
415 const FConstFlowNodeAddOnFunction& Function,
416 EFlowForEachAddOnChildRule AddOnChildRule) const
417{
418 FLOW_ASSERT_ENUM_MAX(EFlowForEachAddOnFunctionReturnValue, 3);
419
420 EFlowForEachAddOnFunctionReturnValue ReturnValue = EFlowForEachAddOnFunctionReturnValue::Continue;
421
422 for (const UFlowNodeAddOn* AddOn : AddOns)
423 {
424 if (!IsValid(AddOn))
425 {
426 continue;
427 }
428
429 ReturnValue = Function(*AddOn);
430
431 if (!ShouldContinueForEach(ReturnValue))
432 {
433 break;
434 }
435
436 FLOW_ASSERT_ENUM_MAX(EFlowForEachAddOnChildRule, 2);
437 if (AddOnChildRule == EFlowForEachAddOnChildRule::AllChildren)
438 {
439 ReturnValue = AddOn->ForEachAddOnConst(Function);
440
441 if (!ShouldContinueForEach(ReturnValue))
442 {
443 break;
444 }
445 }
446 }
447
448 return ReturnValue;
449}
450
451EFlowForEachAddOnFunctionReturnValue UFlowNodeBase::ForEachAddOn(
452 const FFlowNodeAddOnFunction& Function,

Calls 2

IsValidFunction · 0.85
ShouldContinueForEachFunction · 0.85

Tested by

no test coverage detected