Module attribute_slot

Module attribute_slot 

Source
Expand description

Runtime by-name attribute lookup over the generated EXPRESS registries.

The generator (@ifc-lite/codegen) emits, beside every IfcType::attribute_names(), a parallel attribute_flags() byte slice: bits 0-3 the value kind, bit 4 AGGREGATE, bit 5 OPTIONAL. This module is the one decoder of those bytes and the one by-name lookup over them (SchemaVersion::attribute); callers that need “where does attribute X of entity Y live, and what shape is it” ask here instead of keeping a second table (F3e-0a, #7780).

The lookup is ASCII-case-insensitive in both the entity and the attribute name, per-schema (a position in IFC4 says nothing about IFC2X3), and answers None explicitly for an entity the schema does not declare or an attribute the entity does not have. It scans the entity’s attribute list (a few dozen names at most) after one registry match; callers on a loop memoise the result per entity type.

Structs§

AttrSlot
One declared attribute of an entity in one schema.

Enums§

AttrKind
What an attribute’s declared EXPRESS type resolves to, through defined types and selects. Mirrors KIND in packages/codegen/src/rust-attribute-flags.ts.