Table of Contents

Class ChunkedCallbackSystem<TContext>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Generic ChunkedCallbackSystem layer that exposes typed access to an ambient TContext populated progressively across the DAG. The context is bound at runtime via RegisterContext<TContext>(TContext) after Configure and before Start.

Override ShouldRun(TContext) to gate dispatch on a typed flag, or Prepare(TContext) to build a per-tick plan and return a dynamic chunk count (0 = skip, >0 = dispatch with that many chunks).

public abstract class ChunkedCallbackSystem<TContext> : ChunkedCallbackSystem, ISystem where TContext : class

Type Parameters

TContext
Inheritance
ChunkedCallbackSystem<TContext>
Implements
Inherited Members

Constructors

ChunkedCallbackSystem()

protected ChunkedCallbackSystem()

Properties

Context

Ambient context bound by the runtime via RegisterContext. Null until bound.

protected TContext Context { get; }

Property Value

TContext

Methods

Configure(SystemBuilder)

The non-generic Configure is sealed; typed-system authors override Configure(SystemBuilder<TContext>) instead.

protected override sealed void Configure(SystemBuilder b)

Parameters

b SystemBuilder

Configure(SystemBuilder<TContext>)

Configure via the typed builder.

protected abstract void Configure(SystemBuilder<TContext> b)

Parameters

b SystemBuilder<TContext>

Prepare(TContext)

Override to build a per-tick plan from the typed context and return the chunk count. Default invokes the fluent lambda set via Prepare(Func<TContext, int>), falling back to -1.

protected virtual int Prepare(TContext ctx)

Parameters

ctx TContext

Returns

int

ShouldRun(TContext)

Override to gate dispatch on a typed context flag. Default invokes the fluent lambda set via ShouldRun(Func<TContext, bool>), falling back to true.

protected virtual bool ShouldRun(TContext ctx)

Parameters

ctx TContext

Returns

bool