Table of Contents

Interface ILuaDataProvider

Namespace
EncDotNet.S100.Pipelines.Vector.Lua
Assembly
EncDotNet.S100.Core.dll

The C# side of the S-100 Part 9A Lua Portrayal Model host interface for a single render. A provider bridges a product's dataset (ISO 8211 records for S-101, GML features for S-131) to the Lua Host* functions, collects the instructions emitted by HostPortrayalEmit, and resolves feature references back to their feature-type codes.

public interface ILuaDataProvider

Remarks

Providers are stateful and render-scoped: they accumulate emitted instructions in EmittedInstructions as the Lua engine runs. A fresh provider is created per render via Create(MarinerSettings), so the same executor can be reused across renders without shared mutable state.

The S-101 and S-131 providers implement an identical surface over different stores, which is what makes the generic LuaRuleExecutor possible.

Properties

EmittedInstructions

Drawing instructions emitted during portrayal execution.

IReadOnlyList<EmittedInstruction> EmittedInstructions { get; }

Property Value

IReadOnlyList<EmittedInstruction>

PostLoadScripts

Product-specific Lua scripts that must run after main.lua loads and before context-parameter initialisation and PortrayalMain. These are the host-adapter shims (e.g. HostGetSpatial / HostFeatureGetSpatialAssociations wrappers) and compatibility patches. The list is executed in order.

IReadOnlyList<string> PostLoadScripts { get; }

Property Value

IReadOnlyList<string>

Remarks

Owned by the provider because the shims bridge this provider's host functions into Lua objects; S-131's spatial shim differs from S-101's because its geometry is synthesised from GML.

Methods

GetFeatureTypeCode(string)

Resolves a Lua-side feature reference (the stringified record id passed to HostPortrayalEmit) to its feature-type code (e.g. DEPCNT), or null when it cannot be resolved. Used for per-feature-type telemetry.

string? GetFeatureTypeCode(string featureRef)

Parameters

featureRef string

Returns

string

RegisterHostFunctions(ILuaContext)

Registers all Host* functions (and any debug table) on the given Lua context.

void RegisterHostFunctions(ILuaContext lua)

Parameters

lua ILuaContext