IFClite TypeScript API
    Preparing search index...

    Class MutablePropertyView

    Hierarchy

    • MutableOverlayState
      • MutablePropertyView
    Index
    applyMutations captureSetOverlay clear configureExpressIdAllocator copyOverlayState createEntity createPropertySet createQuantitySet deleteAttributeMutation deleteEntity deleteProperty deletePropertyMutation deletePropertySet deleteQuantity deleteQuantityMutation deleteQuantitySet exportMutations getAttributeMutationsByEntity getAttributeMutationsForEntity getAttributeOverrideEntityIds getAttributeOverrideReferenceCandidates getCreatedExpressIdBounds getEffectiveChanges getEntityAlias getEntityTypeMutation getForEntity getModifiedEntityCount getMutationCount getMutationRevision getMutations getMutationsForEntity getNewEntities getNewEntitiesOfType getNewEntitiesReferencing getNewEntity getNewEntityCount getNewEntityCreationOrder getNewEntityReferenceSlotIds getNewEntityType getPositionalMutationsForEntity getPropertyMutation getPropertyValue getQuantitiesForEntity getQuantityBaseRevisions getQuantityMutation getTombstones getTypeMutations hasChanges hasNewEntity hasPendingChanges hasPropertyBase hasQuantityBase importMutations indexAttributeOverride isDeleted isPropertySetDeleted isQuantitySetDeleted markOverlayChanged matchesOverlayState overlayState peekNextExpressId prepareAtomic readNewEntities readNewEntitiesOfType readNewEntity readNewEntityKinds removeAttributeMutation removePositionalMutation removeQuantityMutation removeTypeMutation resetExpressIdAllocator resolveBaseEntityId restoreFromTombstone restoreNewEntity restoreOverlayState restoreSetOverlay runAtomic setAttribute setAttributeExtractor setAttributeMutation setEntityAlias setEntityType setExpressIdWatermark setOnDemandExtractor setPositionalAttribute setProperty setPropertyMutation setQuantity setQuantityBaseRevisions setQuantityExtractor setQuantityMutation snapshotForInspection stampSetOverlay trackEntityChanges withDeferredAllocatorNotification
    attributeKeysByEntity: Map<number, Set<string>>
    attributeMutations: Map<string, AttributeMutation>
    deletedPsets: Set<string>
    deletedQsets: Set<string>
    entityAliases: Map<number, number>

    Overlay-entity → source-entity aliases for property/quantity reads.

    When the viewer duplicates an existing entity, the new entity has no row in the parsed property table — getBasePropertiesForEntity would return [] and the property panel would show "No property sets". Aliasing redirects the BASE read to the source entity so the duplicate inherits its psets / qsets visually, while overlay mutations (overrides, creates, deletes) stay scoped to the overlay-entity's own id — so editing a property on the duplicate doesn't bleed into the source.

    Aliases follow at most one hop (no chains). They never affect STEP export — the export overlay emits the duplicate exactly as the StoreEditor recorded it, with whatever new IfcRel*ByProperties the caller chose to add.

    forgottenCreatedEntities: Set<number>

    Ids createEntity allocated and deleteEntity then forgot (removed from newEntities, per that method's "existing entities are tombstoned; new entities are simply forgotten" contract). Tracked separately so getEffectiveChanges() / collectEffectiveChanges can tell "overlay-created then forgotten" apart from "an ordinary source-buffer entity" — both are otherwise indistinguishable, being simply absent from newEntities. restoreNewEntity (the undo-of-delete counterpart) clears the id back out.

    forgottenEntityOverlay: Map<number, ForgottenEntityOverlay>

    Rows purged when a creation is forgotten; undo-of-delete restores them with their original journal. Omitting the purge leaves dangling exported psets/relationships; omitting the stash loses edits on undo (#1967).

    minNextExpressId: () => number
    newEntities: NewEntityMap
    newPsets: Map<number, Map<string, PropertySet>>
    newQsets: Map<number, Map<string, QuantitySet>>
    overriddenEntities: NewEntityMap
    overriddenSourceIds: Set<number>
    positionalAttrMutations: Map<number, Map<number, IfcAttributeValue>>
    propertyKeysByEntity: Map<number, Set<string>>

    Secondary indices: entityId → mutation keys for that entity.

    getForEntity previously iterated the entire propertyMutations / quantityMutations map per pset to find newly-added properties — O(M·P) per call. These indices keep that step O(M_entity) instead.

    propertyMutations: Map<string, PropertyMutation>
    propertyTargets: Map<string, readonly [string, string]>
    quantityKeysByEntity: Map<number, Set<string>>
    quantityMutations: Map<string, QuantityMutation>
    quantityTargets: Map<string, readonly [string, string]>
    sourceWatermark: number
    tombstones: Set<number>
    typeMutations: Map<number, EntityTypeMutation>
    • get mutationHistory(): Mutation[]

      Returns Mutation[]

    • set mutationHistory(rows: Mutation[]): void

      Parameters

      Returns void

    • get nextAllocatedId(): number

      Returns number

    • set nextAllocatedId(id: number): void

      Parameters

      • id: number

      Returns void

    • Apply a batch of mutations (e.g., from imported change set). The dispatcher itself lives in applyMutationsBatch (./apply-mutations.js) — this method just supplies the two bits of private state it needs without exposing them publicly.

      Parameters

      Returns void

    • Capture every overlay row one set owns on one entity (#5965). Deep-copied, so later edits to the live maps cannot reach into a recorded snapshot.

      Parameters

      • kind: "property" | "quantity"
      • entityId: number
      • setName: string

      Returns SetOverlaySnapshot

    • Clear mutations while preserving the source and externally owned ID floor.

      Returns void

    • Supply an external ownership floor without coupling mutations to a registry. The floor is read again on clear, because published ownership is permanent.

      Parameters

      • minNextExpressId: () => number
      • OptionalonChange: () => void

      Returns void

    • Returns {
          attributeKeysByEntity: Map<number, Set<string>>;
          attributeMutations: Map<string, AttributeMutation>;
          deletedPsets: Set<string>;
          deletedQsets: Set<string>;
          entityAliases: Map<number, number>;
          forgottenCreatedEntities: Set<number>;
          forgottenEntityOverlay: Map<number, ForgottenEntityOverlay>;
          mutationHistory: Mutation[];
          newEntities: NewEntityMap;
          newPsets: Map<number, Map<string, PropertySet>>;
          newQsets: Map<number, Map<string, QuantitySet>>;
          nextAllocatedId: number;
          overriddenEntities: NewEntityMap;
          overriddenSourceIds: Set<number>;
          positionalAttrMutations: Map<number, Map<number, IfcAttributeValue>>;
          propertyKeysByEntity: Map<number, Set<string>>;
          propertyMutations: Map<string, PropertyMutation>;
          propertyTargets: Map<string, readonly [string, string]>;
          quantityKeysByEntity: Map<number, Set<string>>;
          quantityMutations: Map<string, QuantityMutation>;
          quantityTargets: Map<string, readonly [string, string]>;
          tombstones: Set<number>;
          typeMutations: Map<number, EntityTypeMutation>;
      }

    • Create a new entity in the overlay. Returns the freshly-allocated expressId. Callers must ensure setExpressIdWatermark has been seeded from the underlying store before calling this for the first time.

      Parameters

      Returns NewEntity

    • Create a new property set

      Parameters

      Returns Mutation

    • Create a new quantity set

      Parameters

      • entityId: number
      • qsetName: string
      • quantities: { name: string; quantityType: QuantityType; unit?: string; value: number }[]

      Returns Mutation

    • Parameters

      • entityId: number
      • key: string

      Returns boolean

    • Tombstone an entity; false if already tombstoned. Created entities also leave newEntities, so create-then-delete emits no record. Tombstones must remain visible to isDeleted and export guards: forgetting alone emitted dangling property relationships (#2012). Count deletions only for IDs in the source store: created-then-deleted IDs are absent from both the source and newEntities and must not count twice.

      Parameters

      • expressId: number

      Returns boolean

    • Delete a property

      Parameters

      • entityId: number
      • psetName: string
      • propName: string
      • OptionalskipHistory: boolean

        If true, don't add to mutation history (used for undo/redo)

      Returns Mutation | null

    • Parameters

      • entityId: number
      • key: string

      Returns boolean

    • Delete an entire property set

      Parameters

      • entityId: number
      • psetName: string

      Returns Mutation

    • Delete one quantity while retaining the rest of its quantity set.

      Parameters

      • entityId: number
      • qsetName: string
      • quantName: string
      • OptionalskipHistory: boolean

      Returns Mutation | null

    • Parameters

      • entityId: number
      • key: string

      Returns boolean

    • Delete an entire quantity set - the inverse of createQuantitySet, and the exact mirror of deletePropertySet one level up.

      It was missing until #2508's zone write-back needed it, which is why deletedQsets existed but was only ever populated by the restore path. Without it, a writer that REPLACES an entity's quantity set can shrink it but never empty it: re-running with no quantities to write leaves the previous run's numbers in place, so the file states volumes beside a property saying the volume could not be computed.

      Parameters

      • entityId: number
      • qsetName: string

      Returns Mutation

    • Export mutations as JSON. Includes every record in mutationHistory, including CREATE_ENTITY — but see importMutations for why replaying that record on another view does not reconstruct the entity.

      Returns string

    • Every attribute override currently in the overlay, keyed by entity then attribute name.

      This is the current overlay state, not the append-only mutation history: an undone edit has had its overlay entry reset to the pre-edit value (or removed outright), so it does not appear here, whereas its superseded UPDATE_ATTRIBUTE record lives on in getMutations forever. Export must read this — replaying the history resurrects undone edits (#1957).

      Returns Map<number, Map<string, string>>

    • Get mutated attributes for an entity. Returns only attributes that have been added/modified via mutations.

      Parameters

      • entityId: number

      Returns { name: string; value: string }[]

    • Snapshot candidate ids for effective attribute reads. Includes named, positional and type overrides even when written without journal records; callers apply their normal live-entity and attribute-layout checks.

      Parameters

      • OptionalcreatedTypes: readonly string[]
      • OptionalreferencedId: number

      Returns number[]

    • Possible references introduced by overrides. Combine with authored/source reference candidates and verify through the effective record grammar.

      Parameters

      • id: number

      Returns number[]

    • Bounds of IDs this overlay created (live, forgotten, or stashed/undoable). Both bounds cover all retained creations (zero if absent). Source tombstones and source-only allocator floors are never creation claims.

      Returns { highest: number; lowest: number }

    • With an entity ID, visit only that entity's indexed mutation rows.

      Parameters

      • OptionalentityId: number

      Returns EffectiveChange[]

    • Read the alias for a given overlay id, or null if none.

      Parameters

      • overlayId: number

      Returns number | null

    • Get the retype intent for an entity, or null if it hasn't been retyped.

      Parameters

      • entityId: number

      Returns EntityTypeMutation | null

    • Get all property sets with mutations applied. An explicit base provider lets an exporter supply its store without changing this live view.

      Parameters

      • entityId: number
      • OptionalbaseProvider: (baseId: number) => PropertySet[]

      Returns PropertySet[]

    • Get count of modified entities.

      Reads the live overlay, NOT mutationHistory (issue #1915): undo does not pop history, so a history-based count could over-report — e.g. after setAttribute + removeAttributeMutation (exactly what undoing a freshly-created attribute mutation does), the overlay is empty again but history still holds the one entry. This must agree with hasPendingChanges: zero here iff that is false.

      Must also agree with getEffectiveChanges — an entity contributing zero effective rows (a create -> edit -> delete deleteEntity forgot, or an edit fully undone back to its base value) must not be counted here either. collectModifiedEntityIds is deliberately DERIVED FROM getEffectiveChanges() rather than hand-walking the overlay maps a second time, so the two structurally cannot diverge again (issue: the #1915 forgotten-created blind spot, and the #1967 no-op-edit blind spot that a second hand-rolled walk reintroduced).

      Returns number

    • Returns number

    • O(1) live-overlay invalidation token, independent of Undo history. Writes, removals and state publications advance it, including skipHistory. Conservative increments may invalidate unchanged geometry; it is never serialized or rewound by Undo/Redo. Detached failed drafts do not affect it.

      Returns number

    • Get journal mutations from an optional append-only cursor (default: all)

      Parameters

      • Optionalsince: number

      Returns Mutation[]

    • Get mutations for a specific entity

      Parameters

      • entityId: number

      Returns Mutation[]

    • Returns all overlay-created entities in insertion order.

      Returns NewEntity[]

    • Created entities authored as type, in creation order, from an index (#5413).

      Parameters

      • type: string

      Returns IterableIterator<NewEntity>

    • Authored reference candidates, before named/positional overrides.

      Parameters

      • id: number

      Returns IterableIterator<NewEntity>

    • Parameters

      • expressId: number

      Returns NewEntity | null

    • Number of overlay-created entities; reads no payload.

      Returns number

    • Relative order of a live creation; do not persist across undo/restoration.

      Parameters

      • id: number

      Returns number | null

    • Exact positional scalar-reference projection; null includes malformed values. First use indexes this class; subsequent writes maintain it, including drafts.

      Parameters

      • type: string
      • slot: number
      • target: number | null

      Returns number[]

    • Authored creation class at one ID; no attribute borrow or draft copy.

      Parameters

      • id: number

      Returns string | null

    • Get all positional argument overrides for an entity, keyed by index.

      Parameters

      • entityId: number

      Returns Map<number, IfcAttributeValue> | null

    • The live overlay's CURRENT property mutation for one entity's specific pset+prop, or undefined when that exact key carries no override right now.

      Reads propertyMutations directly (the same map getPropertyValue and hasChanges consult) — never mutationHistory (see getMutationsForEntity above), which is append-only and does not shrink on undo. Undo re-applies the inverse mutation with skipHistory=true (mutationSlice.ts, "to avoid polluting mutation history"): that inverse call still writes through setProperty/deleteProperty, so propertyMutations — and thus this method — reflects the reverted (or, after redo, re-applied) value immediately, while getMutationsForEntity keeps returning the stale pre-undo entry.

      Unlike getPropertyValue (which collapses "no override", "override value is null", and "override is a DELETE marker" all down to a bare null), this returns the raw PropertyMutation so a caller projecting the overlay onto an EXTERNAL base it doesn't otherwise share with this view (e.g. the IDS bridge's PropertyOverlayResolver, #3929) can tell "nothing to apply here" apart from "apply a DELETE" apart from "apply a SET to null". Unlike getEffectiveChanges(), this does not require the view's own getBasePropertiesForEntity to already know the pset — setProperty always writes propertyMutations regardless of whether the pset is new-in-session or pre-existing (see its "Always store in propertyMutations for tracking" comment), so this stays correct for a view with no base wired at all (a MutablePropertyView overlay used purely as a delta against someone else's separate base).

      Parameters

      • entityId: number
      • psetName: string
      • propName: string

      Returns Readonly<PropertyMutation> | undefined

    • Get a specific property value with mutations applied

      Parameters

      • entityId: number
      • psetName: string
      • propName: string

      Returns PropertyValue

    • Get all quantity sets with mutations applied. The optional provider reads an external base store without changing this live view. Native exporters may opt into empty instances to retain a deleted last member as an ownership removal; ordinary quantity displays omit them.

      Parameters

      • entityId: number
      • OptionalbaseProvider: (baseId: number) => QuantitySet[]
      • OptionalincludeEmptyInstances: boolean

      Returns QuantitySet[]

    • Current quantity override, including skipHistory and Undo.

      Parameters

      • entityId: number
      • qsetName: string
      • quantityName: string

      Returns Readonly<QuantityMutation> | undefined

    • Every express id this session deleted — source-buffer entities AND ones it created and then deleted. The two are not distinguishable from this set alone; a caller that needs to tell them apart intersects it with the store's own index (see deleteEntity).

      Returns Set<number>

    • Check if an entity currently carries an overlay change.

      Reads the live overlay (same footprint as hasPendingChanges), NOT the append-only mutationHistory — undo does not pop history (see getMutations()), so a history-based check could report true for an entity whose edit was fully undone. Called with no entityId, this is exactly hasPendingChanges.

      Unlike getModifiedEntityCount (derived from getEffectiveChanges so it can't diverge), this is a direct per-entity map lookup kept O(1)-ish for callers that probe many entities (e.g. a per-row "has changes" indicator) — re-deriving effective changes per call would be O(overlay size) each time. That means it can still report true for an entity whose only overlay entry is a no-op edit (undo landed it back at the base value, so previousValue === newValue — see getEffectiveChanges's doc). Over-reporting here is the same safe direction hasPendingChanges already documents; nothing in this repo reads this per-entity form in production as of #1967.

      Parameters

      • OptionalentityId: number

      Returns boolean

    • Whether the overlay created id and still holds it; reads no payload.

      Parameters

      • id: number

      Returns boolean

    • True when the overlay currently carries anything the STEP exporter would bake (property/quantity overrides, attribute / positional / type edits, pset/qset creates or deletes, or overlay-created/tombstoned entities).

      Unlike getMutations / hasChanges, this reflects the current overlay footprint — the same set clear resets and the exporter reads — rather than the append-only mutation history, which never shrinks. It is deliberately a conservative over-approximation: undoing an edit resets the overlay entry's value (or leaves a no-op DELETE marker) instead of removing it, so a fully-reverted model can still report true. That is the safe direction for gating an export bake — over-reporting only costs a redundant (identical-output) re-bake, whereas under-reporting would silently drop edits.

      Returns boolean

    • Whether property reads have a source beneath the edits. Without one, a reader holding a source store can pass its property provider to getForEntity.

      Returns boolean

    • Whether quantity reads have a configured source beneath the edits.

      Returns boolean

    • Import mutations from JSON produced by exportMutations.

      Not a full inverse of exportMutations. A CREATE_ENTITY record carries only the expressId in the history — not the entity's type and attributes — so importMutations cannot rebuild the entity from the record alone: it logs a console.warn and skips the record, and drops every other mutation recorded against that same entity id in the same batch too (so the round trip is lossy — entity and edits both dropped — rather than leaving an orphaned property/attribute/quantity keyed to an id that was never created on the receiving view).

      To carry an overlay-created entity across, call restoreNewEntity() with its NewEntity payload (from getNewEntity/getNewEntities on the source view) before calling importMutations. Once the id is live in newEntities, its dependent mutations replay normally — only the console.warn for the (now redundant) CREATE_ENTITY record still fires.

      Parameters

      • json: string

      Returns void

    • Narrow creations by effective class; source rows remain conservative candidates because this overlay does not own the immutable source index.

      Parameters

      • entityId: number

      Returns void

    • Parameters

      • expressId: number

      Returns boolean

    • Whether a base property set is masked by a whole-set deletion.

      Parameters

      • entityId: number
      • psetName: string

      Returns boolean

    • Whether a base quantity set is masked by a whole-set deletion.

      Parameters

      • entityId: number
      • qsetName: string

      Returns boolean

    • Parameters

      • OptionalentityId: number

      Returns void

    • Parameters

      • state: {
            attributeKeysByEntity: Map<number, Set<string>>;
            attributeMutations: Map<string, AttributeMutation>;
            deletedPsets: Set<string>;
            deletedQsets: Set<string>;
            entityAliases: Map<number, number>;
            forgottenCreatedEntities: Set<number>;
            forgottenEntityOverlay: Map<number, ForgottenEntityOverlay>;
            mutationHistory: Mutation[];
            newEntities: NewEntityMap;
            newPsets: Map<number, Map<string, PropertySet>>;
            newQsets: Map<number, Map<string, QuantitySet>>;
            nextAllocatedId: number;
            overriddenEntities: NewEntityMap;
            overriddenSourceIds: Set<number>;
            positionalAttrMutations: Map<number, Map<number, IfcAttributeValue>>;
            propertyKeysByEntity: Map<number, Set<string>>;
            propertyMutations: Map<string, PropertyMutation>;
            propertyTargets: Map<string, readonly [string, string]>;
            quantityKeysByEntity: Map<number, Set<string>>;
            quantityMutations: Map<string, QuantityMutation>;
            quantityTargets: Map<string, readonly [string, string]>;
            tombstones: Set<number>;
            typeMutations: Map<number, EntityTypeMutation>;
        }

      Returns boolean

    • Borrowed only for synchronous comparison; never returned to callers.

      Returns {
          attributeKeysByEntity: Map<number, Set<string>>;
          attributeMutations: Map<string, AttributeMutation>;
          deletedPsets: Set<string>;
          deletedQsets: Set<string>;
          entityAliases: Map<number, number>;
          forgottenCreatedEntities: Set<number>;
          forgottenEntityOverlay: Map<number, ForgottenEntityOverlay>;
          mutationHistory: Mutation[];
          newEntities: NewEntityMap;
          newPsets: Map<number, Map<string, PropertySet>>;
          newQsets: Map<number, Map<string, QuantitySet>>;
          nextAllocatedId: number;
          overriddenEntities: NewEntityMap;
          overriddenSourceIds: Set<number>;
          positionalAttrMutations: Map<number, Map<number, IfcAttributeValue>>;
          propertyKeysByEntity: Map<number, Set<string>>;
          propertyMutations: Map<string, PropertyMutation>;
          propertyTargets: Map<string, readonly [string, string]>;
          quantityKeysByEntity: Map<number, Set<string>>;
          quantityMutations: Map<string, QuantityMutation>;
          quantityTargets: Map<string, readonly [string, string]>;
          tombstones: Set<number>;
          typeMutations: Map<number, EntityTypeMutation>;
      }

    • The next expressId that createEntity would allocate.

      Returns number

    • Prepare an overlay publication without changing live IFC state (#4243). Use for commands that must validate other synchronous resources first. validate and commit reject intervening edits, including skip-history edits. Commit is idempotent; the prepared draft is never published by reference.

      Type Parameters

      • T

      Parameters

      Returns { result: T; commit(): void; rollback(): void; validate(): void }

    • Parameters

      • type: string

      Returns IterableIterator<NewEntity>

    • Read-only borrows; use the ordinary getters when retaining mutable arrays. Borrowed rows are frozen copies. Inside a transaction they read unmodified rows without copying them into the draft, so a scan of the session adds nothing to the commit's comparison (#8452).

      Parameters

      • id: number

      Returns NewEntity | null

    • Ids and authored classes of created entities (of type, when given), in creation order; reads no payload, copies no row.

      Parameters

      • Optionaltype: string

      Returns IterableIterator<{ expressId: number; type: string }>

    • Remove an attribute mutation (used by undo for newly set attributes)

      Parameters

      • entityId: number
      • attrName: string

      Returns void

    • Drop a single positional override. Used by undo to roll a setPositionalAttribute back to "no override" when there was no prior value. Mirrors removeAttributeMutation for symmetric naming.

      Parameters

      • entityId: number
      • index: number

      Returns void

    • Remove a quantity mutation (used by undo for newly created quantities)

      Parameters

      • entityId: number
      • qsetName: string
      • OptionalquantName: string

      Returns void

    • Drop a retype intent, reverting the entity to its original class. Because setEntityType never mutates NewEntity.type in place, this is a complete revert for both source-buffer and overlay-created entities — nothing else to roll back.

      Parameters

      • entityId: number

      Returns void

    • Returns void

    • Resolve to the base id used for property/quantity reads. Returns the input id when no alias is set. Aliases follow at most one hop — chained duplicates resolve to their immediate source, not the original.

      Parameters

      • entityId: number

      Returns number

    • Reverse deleteEntity for an existing-entity tombstone. Returns true if a tombstone was removed; false if the id was not tombstoned. Used by undo of a DELETE_ENTITY mutation on a source-buffer entity. Overlay-only entities are restored via a separate path (restoreNewEntity).

      Parameters

      • expressId: number

      Returns boolean

    • Re-add an overlay-only entity to newEntities. Pairs with deleteEntity to support undo of a freshly-created-and-then-deleted entity. The caller is responsible for stashing the NewEntity record between delete and restore (the slice's undo stack does this).

      Parameters

      Returns void

    • Parameters

      • state: {
            attributeKeysByEntity: Map<number, Set<string>>;
            attributeMutations: Map<string, AttributeMutation>;
            deletedPsets: Set<string>;
            deletedQsets: Set<string>;
            entityAliases: Map<number, number>;
            forgottenCreatedEntities: Set<number>;
            forgottenEntityOverlay: Map<number, ForgottenEntityOverlay>;
            mutationHistory: Mutation[];
            newEntities: NewEntityMap;
            newPsets: Map<number, Map<string, PropertySet>>;
            newQsets: Map<number, Map<string, QuantitySet>>;
            nextAllocatedId: number;
            overriddenEntities: NewEntityMap;
            overriddenSourceIds: Set<number>;
            positionalAttrMutations: Map<number, Map<number, IfcAttributeValue>>;
            propertyKeysByEntity: Map<number, Set<string>>;
            propertyMutations: Map<string, PropertyMutation>;
            propertyTargets: Map<string, readonly [string, string]>;
            quantityKeysByEntity: Map<number, Set<string>>;
            quantityMutations: Map<string, QuantityMutation>;
            quantityTargets: Map<string, readonly [string, string]>;
            tombstones: Set<number>;
            typeMutations: Map<number, EntityTypeMutation>;
        }
      • Optionalrevision: number
      • OptionalchangedIds: ReadonlySet<number> | null

      Returns void

    • Put one set's overlay rows back exactly as snapshot captured them, dropping any row the set has gained since. Undo restores a whole-set mutation's setOverlay.before, redo its after (#5965).

      Parameters

      Returns void

    • Stage synchronous overlay edits and publish them together (#4243). Throws leave the original overlay, history and allocator untouched. Source tables/extractors are shared read-only; mutable state is detached both before editing and on commit, so an escaped draft cannot edit this view. External effects (files, renderer or network) belong outside this callback.

      Type Parameters

      • T

      Parameters

      Returns T

    • Set an entity attribute value (Name, Description, ObjectType, Tag, etc.)

      Parameters

      • entityId: number
      • attrName: string
      • value: string
      • OptionaloldValue: string
      • OptionalskipHistory: boolean

      Returns Mutation

    • Set the base entity-attribute extractor (Name, Description, ObjectType, Tag, ...), used only to resolve previousValue in getEffectiveChanges(). Without one, attribute previousValue falls back to whatever oldValue the overlay entry itself carries — which undo can leave stale/absent (see getEffectiveChanges() doc).

      Parameters

      Returns void

    • Parameters

      Returns void

    • Alias an overlay-only entity to a source entity for property / quantity reads. Used by the duplicate flow so a fresh duplicate inherits its source's psets / qsets in the property panel without eagerly cloning them. Edits on the duplicate stay scoped to the duplicate's own id (override slots are keyed by entity id, not by base id).

      Pass null as the source to clear an existing alias.

      Parameters

      • overlayId: number
      • sourceId: number | null

      Returns void

    • Change an entity's IFC class in place ("retype" / reassign class).

      The entity keeps its expressId, so its geometry, placement, representation and every IfcRel* reference (all keyed by #id) carry over unchanged. At export the exporter re-lays-out the entity's attributes BY NAME against the target class's declared attribute list — attributes the target class doesn't have are dropped, missing ones become $. This mirrors IfcOpenShell's ifcopenshell.util.schema.reassign_class.

      Intended for compatible reassignments — e.g. the building-element subtypes (IfcBuildingElementProxy → IfcColumn / IfcBeam / IfcMember / IfcPlate / IfcWall) that share the IfcElement attribute layout. For such retypes only the class keyword changes (and an optional PredefinedType).

      Parameters

      • entityId: number
      • newType: string

        Target IFC class (canonical PascalCase, e.g. "IfcColumn").

      • OptionalpredefinedType: string | null

        Optional PredefinedType for the target class. Unknown values fall back to USERDEFINED + ObjectType at export.

      • OptionaloldType: string
      • OptionalskipHistory: boolean

      Returns Mutation

    • Seed the express-ID allocator above the parsed source. This changes no IFC content; transactions validate the allocator separately from revision.

      Parameters

      • maxExistingId: number

      Returns void

    • Set an on-demand property extractor function This is used when properties are extracted lazily from the source buffer

      Parameters

      Returns void

    • Set a positional STEP argument on an entity by zero-based index.

      This is the only path for editing non-IfcRoot entities (e.g. profile dimensions on IfcRectangleProfileDef) where attributes have no symbolic names. Values follow the same conventions as NewEntity.attributes: numbers become #expressId references when paired with a reference slot, otherwise REAL/INTEGER literals; strings become quoted STEP strings; null becomes $.

      Parameters

      • entityId: number
      • index: number
      • value: IfcAttributeValue
      • OptionalskipHistory: boolean

      Returns Mutation

    • Set a property value If the property set doesn't exist, creates it automatically

      Parameters

      • entityId: number
      • psetName: string
      • propName: string
      • value: PropertyValue
      • OptionalvalueType: PropertyValueType
      • Optionalunit: string
      • OptionalskipHistory: boolean

        If true, don't add to mutation history (used for undo/redo)

      • OptionaldataType: string

        IFC measure dataType this value was scaled against at write time (e.g. an IDS correction, #3929/#3943), stored on the PropertyMutation for a read-side overlay that needs to convert it between unit frames. New, additive, optional — every existing caller is unaffected.

      Returns Mutation

    • Parameters

      • entityId: number
      • key: string
      • mutation: PropertyMutation
      • Optionaltarget: readonly [string, string]

      Returns void

    • Set a single quantity value (add to existing or new quantity set)

      Parameters

      • entityId: number
      • qsetName: string
      • quantName: string
      • value: number
      • OptionalqType: QuantityType
      • Optionalunit: string | null
      • OptionalskipHistory: boolean

      Returns Mutation

    • Name the sets the quantity base revises, so a full export writes them as it writes an edited set. Installed beside setQuantityExtractor.

      Parameters

      Returns void

    • Parameters

      • entityId: number
      • key: string
      • mutation: QuantityMutation
      • Optionaltarget: readonly [string, string]

      Returns void

    • Copy the effective overlay and its read configuration for inspection of this revision. Source data stays shared. Edits to the copy are detached.

      Returns MutablePropertyView

    • Record the set's overlay state on either side of a whole-set edit on the mutation it produced, for undo / redo (#5965). before is taken first.

      Parameters

      Returns void

    • Allocator observers may read records, indexes, history and revision synchronously.

      Type Parameters

      • T

      Parameters

      • action: () => T

      Returns T