Skip to main content

Module tape

Module tape 

Source
Expand description

The value tape: attribute values as flat C data.

A value is a pre-order array of OpenbimIfcValueNode. A container node (list, typed) is followed by its children; list records how many, typed always has exactly one. Strings are not in the nodes: each node carries an (offset, len) byte range into one shared UTF-8 buffer, which is how text and names cross without any Rust-owned pointer.

$, *, .U. and .F. are distinct kinds or payloads, never folded, for the same reason as in the JavaScript and Python bindings (ADR 0013).

A tape rather than recursive structs or a cursor API: one call returns a whole value, the caller owns both buffers, and no allocation crosses the ABI.

Structs§

OpenbimIfcValueNode
One node of a value tape. Fields a kind does not use are zero.
Reader
Reads values back off a caller’s tape, checking every field.
Tape
A value flattened to a tape: the nodes plus their shared string bytes.

Constants§

OPENBIM_IFC_KIND_BINARY
Binary digits in the string range.
OPENBIM_IFC_KIND_BOOL
.T./.F.; int_value is 1 or 0.
OPENBIM_IFC_KIND_DERIVED
*.
OPENBIM_IFC_KIND_ENUM
Enumeration name in the string range.
OPENBIM_IFC_KIND_EXACT
Only in a plain value (openbim_ifc_v0_1_entity_set_attribute_by_name_plain, #342): one child follows and is written exactly as given, never coerced. Refused in every other tape.
OPENBIM_IFC_KIND_INTEGER
Integer in int_value.
OPENBIM_IFC_KIND_LIST
Aggregate; child_count children follow.
OPENBIM_IFC_KIND_NULL
Kind codes. Plain integers, not a Rust enum, so an unknown value from C is rejected rather than read as an invalid discriminant.
OPENBIM_IFC_KIND_REAL
Finite real in real_value.
OPENBIM_IFC_KIND_REF
Entity id in int_value (non-negative).
OPENBIM_IFC_KIND_TEXT
Text in the string range.
OPENBIM_IFC_KIND_TYPED
Typed wrapper; type name in the string range, one child follows.
OPENBIM_IFC_KIND_UNKNOWN
.U..

Functions§

kind_code
The C code for a kind.