A type index built incrementally from the streaming parse's per-record events (M2), rather than from the finished element array. Feed its handler to a StreamingRecordDispatcher (or directly to buildIndexStreaming's onRecordIndexed) and it accumulates, per concrete type, the set of express IDs seen — so the moment parsing reaches a record it is queryable, without waiting for end-of-parse.

Queries take entity constructors and expand to their subtype closure via the generated query (conway #383), so expressIDsOfTypes(IfcProduct) unions every product subtype exactly as the resident model's type index does.

Express IDs are held in per-type Sets, so the consumer is idempotent under the streaming builder's rare grow-and-restart (records re-fire from localID 0): re-adding an express ID is a no-op. Memory is O(records) — the same order as the element index it mirrors.

Scope: membership is keyed on the raw parse typeID. External-mapping / complex records (typeID 0) are therefore not attributed to their mapped classes here — resolving those needs the record's multiMapping, which the event stream doesn't carry; that's the model's construction-time index. For the overwhelming majority of records (simple, one type each) this index is exact, which the parity test pins.

Type Parameters

  • TypeIDType extends number

Constructors

Properties

handler: RecordHandler<TypeIDType> = ...

Record one indexed entity. Bound as handler for direct use as a dispatcher subscription / onRecordIndexed callback.

Unused (kept for the RecordHandler shape).

The record's express ID.

The record's concrete type ID (undefined / 0 records are ignored — they carry no concrete queryable type here).

Methods

  • The distinct concrete type IDs seen so far.

    Returns IterableIterator<TypeIDType, any, any>

    The concrete types.

  • Count records of the given types (including subtypes) seen so far.

    Parameters

    Returns number

    The number of matching records.

  • Lazily iterate the express IDs of all records of the given types (including subtypes).

    Parameters

    Returns IterableIterator<number, any, any>

    Express IDs of matching records.

    Each matching express ID.