Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/packages/firebird-core/src/model/default-piece-init.ts is written in an unsupported language. File is not indexed.

0001 import {registerEventPieceFactory} from "./event-piece";
0002 import {BoxHitPieceFactory} from "./box-hit.piece";
0003 import {PointTrajectoryPieceFactory} from "./point-trajectory.piece";
0004 
0005 /**
0006  * Registers the built-in event piece factories (the decoders that turn DEX JSON
0007  * into typed EventPiece objects).
0008  *
0009  * Core has no dependency injection, so registration is an explicit call:
0010  * - Web workers and node scripts call this function directly.
0011  * - The Angular application registers factories through the `EVENT_PIECE_FACTORIES`
0012  *   DI token instead (see firebird-ng `provideFirebird()`); the built-in factories
0013  *   are contributed there the same way an extension contributes its own.
0014  *
0015  * There are intentionally no import side effects: a module that registers itself
0016  * at import time fights tree-shaking and hides the wiring.
0017  */
0018 export function initPieceFactories() {
0019   registerEventPieceFactory(new BoxHitPieceFactory());
0020   registerEventPieceFactory(new PointTrajectoryPieceFactory());
0021 }