Skip to main content

Module authoring

Module authoring 

Source
Expand description

Schema-checked entity creation (#330, feature author).

A batch of AuthorOps runs as one checked transaction through the facade’s ifc::apply_authoring, against the release the header declares: every operation, in order, or, when any is refused, none, and the model is unchanged. The operations: create an entity by type and named attributes; edit named attributes; remove an entity with its relationships; the builders – the project, a spatial element aggregated under its parent, a product placed, contained and typed, a type object, a type assignment, a containment, an aggregation, a local placement and an owner history; and the shape representation operations (#481) – assemble one from items in a context, its type checked against them or inferred, assign it to a product or (as a representation map) a type, unassign, copy and remove it; and the copy operations (#479) – a product with what it solely owns, and an entity by an explicit share/copy policy (IfcModel::copy_product, IfcModel::append from another model).

An operation names an entity an earlier one produced by its handle, HANDLE_BASE plus the operation’s position (handle), anywhere an id goes, attribute values included. The result reports per operation the id the produced entity received.

Hosts carry an operation in their own idiom and convert it field by field, guided by OPS, into the tape form AuthorOp::from_tagged reads (see the ops module).

Refusals: unsupported-schema for a release this build does not bundle, or a type it does not declare; unknown-attribute; derived-attribute; missing-attribute for a required attribute left unset; invalid-value for a value of the wrong type, form or cardinality, a duplicate GlobalId, a seed reused for a second batch whose derived GlobalIds the model already holds, a malformed operation or handle, or a placement the schema cannot hold; wrong-entity-type for an abstract type, a type of the wrong kind for its builder, or a reference to an entity the attribute does not accept; missing-entity for an edited or removed entity that does not exist; missing-reference for a reference to one; invalid-model for an object given a second containment, decomposition or type, or a second IfcProject, a representation that already has its one use, a product definition shape other products share, or a representation not assigned where it is unassigned from; invalid-value also for a representation type its items do not fit, items no type fits, or a missing representation identifier; unsupported for a type check needing a curve dimension that cannot be derived; still-referenced for a removal an entity other than a relationship still needs; feature-disabled without the author feature. The message names the refused operation’s position.

Structs§

AppendOptions
How IfcModel::append copies from another model (the facade’s AppendOptions).
AuthorOp
One operation of a batch, read from its tape form.
AuthoringResult
What a committed batch did.
CopiedEntity
One original and its copy (or the target entity reused for it).
CopyProductOptions
What IfcModel::copy_product copies and joins (the facade’s CopyProductOptions).
CopyReport
What a copy or an append did, or, for a dry run, would do.
FieldSpec
One field of an operation.
KeptEntity
One entity the removal reached and kept.
OpSpec
One operation and its fields.
PurgeOptions
What IfcModel::purge removes.
RemovalReport
What a removal or purge did, or, for a dry run, would do.
RemoveProductOptions
What IfcModel::remove_product does where it would otherwise refuse.
RemovedEntity
One removed entity.

Enums§

FieldKind
How a field’s value is carried.

Constants§

HANDLE_BASE
The first id of the handle range: HANDLE_BASE + i names the entity operation i of a batch produced. 2^62, inside every host’s signed 64-bit integer.
OPS
Every operation, with its fields.

Functions§

handle
The handle of operation index’s entity.
op_spec
The operation named name in either spelling, ASCII case-insensitively.