Class NavigationView<TSource, TTarget>
Navigation join view: tracks source entities whose FK-referenced target satisfies predicates. Registered in both source and target ViewRegistries for incremental refresh.
public class NavigationView<TSource, TTarget> : ViewBase, IView, IDisposable, IEnumerable<long>, IEnumerable where TSource : unmanaged where TTarget : unmanaged
Type Parameters
TSourceTTarget
- Inheritance
-
NavigationView<TSource, TTarget>
- Implements
- Inherited Members
Remarks
Ring buffer semantics differ from a single-entity multi-component EcsView<TArchetype>: componentTag=0 entries carry the source entity PK, componentTag=1 entries carry the target entity PK (a different entity). Forward navigation (source FK changes or source predicate changes) is 1:1. Reverse navigation (target predicate changes) requires fan-out: one target change may affect many source entities.
Methods
DeregisterFromRegistries()
Deregister from all owning ViewRegistries. Called during disposal.
protected override void DeregisterFromRegistries()
Refresh(Transaction, string, int, string)
Drain the ring buffer, evaluate predicates, and update entity set and delta tracking.
public override void Refresh(Transaction tx, string callerFile = null, int callerLine = 0, string callerMethod = null)
Parameters
txTransactioncallerFilestringcallerLineintcallerMethodstring
Remarks
The three trailing caller… parameters are populated by [CallerFilePath] / [CallerLineNumber] / [CallerMemberName]
at user call sites. When the runtime/scheduler invokes a refresh, it must use Typhon.Engine.ViewBase.RefreshFromScheduler(Typhon.Engine.Transaction) instead so engine-internal
paths don't end up as the "user execution site" in the trace.