Skip to main content

Module catalog

Module catalog 

Source
Expand description

The PSD/QTO catalog that property edits check Pset_ and Qto_ sets against (ADR 0017; #123, #318).

A build gets the catalog one of two ways:

  • property-catalog (default; the C and Python bindings) embeds every edition. Nothing needs loading: is_loaded is true and load accepts the bytes without reading them.
  • property-catalog-runtime (the npm package) embeds none. The host reads an edition’s snapshot file, named by file_name, and hands its bytes to load, which checks them against the edition’s pinned SHA-256 and keeps the catalog for the process (for WebAssembly, the module instance). Until then a write to a Pset_/Qto_ set of that release is refused with catalog-not-loaded; removals and other sets are not affected.

Without either feature every function here refuses with feature-disabled, as such a write does.

A release is named as a file header names it: IFC2X3, IFC4 or IFC4X3 (IFC4X3_ADD2), any case. Each reads one edition: IFC2X3 TC1, IFC4 ADD2 TC1 or IFC4X3 ADD2. Any other release has no catalog and is refused with unsupported-schema.

Constants§

RELEASES
The releases that have a catalog edition, in edition order.

Functions§

file_name
The file name of release’s catalog snapshot, such as ifc4x3-add2.bin; the npm package ships it as catalog/<name>.
is_loaded
Whether a write to release’s catalog sets can be checked now.
load
Load release’s catalog from its snapshot bytes: the per-edition file file_name names, or the container of every edition. Refused with invalid-value when the bytes are not the pinned snapshot (another edition’s file, another version, a damaged download); nothing is loaded then. Loading an edition again is a no-op.