IFClite TypeScript API
    Preparing search index...

    Interface CostMutationOverlay

    A loaded model's pending edits, as the cost read model observes them. The SDK builds one from a MutablePropertyView over @ifc-lite/export's effectiveSourceRecord. created is optional for backwards compatibility with overlays compiled against the pre-authoring contract; omitting it means that the overlay has no created entities to project.

    interface CostMutationOverlay {
        created?(): readonly CostCreatedRecord[];
        effectiveRecord(
            expressId: number,
            sourceText: string,
            sourceType: string,
        ): { notWritten: readonly string[]; text: string };
        isDeleted(expressId: number): boolean;
        retypes(): ReadonlyMap<number, string>;
    }
    Index
    • Every entity the overlay CREATED (bim.store.addEntity / StoreEditor.addEntity) — PR A of #4857, "loaded-model cost authoring". Each entry carries its effective class and its record TEXT exactly as @ifc-lite/export's effectiveCreatedRecord (the exporter's own overlay-created-entity writer, writeOverlayCreatedEntities) would emit it, so a freshly authored IfcCostItem reads through bim.cost exactly as the file that will be exported would state it — before the model is ever exported.

      A created entity the overlay later tombstoned is never in this list: StoreEditor.removeEntity forgets an overlay-only entity outright, so it simply falls out of the underlying entity list. error is set instead of type/text when the entity's authored argument list does not scan for a pending retype — the same condition export declines to write under — and the reader reports it as a diagnostic rather than treating the entity as absent from the source it never had.

      Returns readonly CostCreatedRecord[]

    • The record expressId as the exporter will write it, given its source text and class. notWritten lists pending edits the exporter declines to place (it keeps the source slot and warns); the reader reports each as a diagnostic instead of passing the source value off as current.

      Parameters

      • expressId: number
      • sourceText: string
      • sourceType: string

      Returns { notWritten: readonly string[]; text: string }

    • True when expressId is tombstoned — deleted, pending export.

      Parameters

      • expressId: number

      Returns boolean

    • Pending class of every retyped entity, keyed by expressId (any casing).

      Returns ReadonlyMap<number, string>