Skip to main content

ifc_occurrence/table/
mod.rs

1//! The generated occurrence catalogue.
2//!
3//! Source: `references/ifc-spec/ifc4x3-add2/IFC4X3_ADD2.exp`, via
4//! `scripts/gen-occurrences.py`. Do not edit by hand.
5//!
6//! # Two rules, and why the second one needs the type catalogue
7//!
8//! `CorrectPredefinedType` is the familiar one: USERDEFINED
9//! without `ObjectType` names nothing.
10//!
11//! `CorrectTypeAssigned` is stronger and has no analogue on the
12//! type side. An occurrence may be typed by at most one type,
13//! and that type must be the one class the schema pairs with it:
14//! an `IfcPump` takes an `IfcPumpType` and nothing else. The
15//! pairing is a fact about the schema, so it is recorded here
16//! rather than left to the caller, once per release (#214):
17//! IFC4 pairs an `IfcDoor` with `IfcDoorType` as IFC4X3 does, while
18//! IFC2X3, which declares no such rule and no `IfcDoorType`, types
19//! it by an `IfcDoorStyle`. The IFC4 and IFC2X3 columns come from
20//! `references/ifc-spec/ifc4-add2-tc1/IFC4.exp` and
21//! `references/ifc-spec/ifc2x3-tc1/IFC2X3_TC1.exp`.
22
23/// One occurrence class: its slots, enum, and permitted type.
24#[derive(Debug, Clone, Copy, PartialEq, Eq)]
25#[non_exhaustive]
26pub struct Occurrence {
27    /// STEP type name, upper-case as stored.
28    pub type_name: &'static str,
29    /// Total attribute count, including inherited.
30    pub arity: usize,
31    /// Slot holding `PredefinedType`, or `None` when the class has none.
32    pub predefined_slot: Option<usize>,
33    /// Permitted `PredefinedType` tokens; empty when there is no enum.
34    pub members: &'static [&'static str],
35    /// The one type class IFC4X3 ADD2's `CorrectTypeAssigned` permits,
36    /// if any.
37    pub type_class: Option<&'static str>,
38    /// The one type class IFC4 ADD2 TC1's `CorrectTypeAssigned` (or,
39    /// on doors and windows, `CorrectStyleAssigned`) permits, if IFC4
40    /// declares the class and pairs one.
41    pub ifc4_type_class: Option<&'static str>,
42    /// The type class IFC2X3 TC1 pairs with the class: `IfcDoorStyle`
43    /// and `IfcWindowStyle` for doors and windows, otherwise
44    /// [`Self::type_class`] where IFC2X3 declares it, else none.
45    pub ifc2x3_type_class: Option<&'static str>,
46}
47
48mod part1;
49mod part2;
50mod part3;
51mod part4;
52mod part5;
53
54pub use part1::*;
55pub use part2::*;
56pub use part3::*;
57pub use part4::*;
58pub use part5::*;
59
60/// Every occurrence class in the catalogue.
61pub const ALL: &[Occurrence] = &[
62    IFCACTUATOR,
63    IFCAIRTERMINAL,
64    IFCAIRTERMINALBOX,
65    IFCAIRTOAIRHEATRECOVERY,
66    IFCALARM,
67    IFCAUDIOVISUALAPPLIANCE,
68    IFCBEAM,
69    IFCBEARING,
70    IFCBOILER,
71    IFCBOREHOLE,
72    IFCBUILDINGELEMENTPART,
73    IFCBUILDINGELEMENTPROXY,
74    IFCBUILTELEMENT,
75    IFCBURNER,
76    IFCCABLECARRIERFITTING,
77    IFCCABLECARRIERSEGMENT,
78    IFCCABLEFITTING,
79    IFCCABLESEGMENT,
80    IFCCAISSONFOUNDATION,
81    IFCCHILLER,
82    IFCCHIMNEY,
83    IFCCIVILELEMENT,
84    IFCCOIL,
85    IFCCOLUMN,
86    IFCCOMMUNICATIONSAPPLIANCE,
87    IFCCOMPRESSOR,
88    IFCCONDENSER,
89    IFCCONTROLLER,
90    IFCCONVEYORSEGMENT,
91    IFCCOOLEDBEAM,
92    IFCCOOLINGTOWER,
93    IFCCOURSE,
94    IFCCOVERING,
95    IFCCURTAINWALL,
96    IFCDAMPER,
97    IFCDEEPFOUNDATION,
98    IFCDISCRETEACCESSORY,
99    IFCDISTRIBUTIONBOARD,
100    IFCDISTRIBUTIONCHAMBERELEMENT,
101    IFCDISTRIBUTIONCONTROLELEMENT,
102    IFCDISTRIBUTIONFLOWELEMENT,
103    IFCDOOR,
104    IFCDUCTFITTING,
105    IFCDUCTSEGMENT,
106    IFCDUCTSILENCER,
107    IFCEARTHWORKSCUT,
108    IFCEARTHWORKSELEMENT,
109    IFCEARTHWORKSFILL,
110    IFCELECTRICAPPLIANCE,
111    IFCELECTRICDISTRIBUTIONBOARD,
112    IFCELECTRICFLOWSTORAGEDEVICE,
113    IFCELECTRICFLOWTREATMENTDEVICE,
114    IFCELECTRICGENERATOR,
115    IFCELECTRICMOTOR,
116    IFCELECTRICTIMECONTROL,
117    IFCELEMENTASSEMBLY,
118    IFCENGINE,
119    IFCEVAPORATIVECOOLER,
120    IFCEVAPORATOR,
121    IFCFAN,
122    IFCFASTENER,
123    IFCFILTER,
124    IFCFIRESUPPRESSIONTERMINAL,
125    IFCFLOWINSTRUMENT,
126    IFCFLOWMETER,
127    IFCFOOTING,
128    IFCFURNISHINGELEMENT,
129    IFCFURNITURE,
130    IFCGEOGRAPHICELEMENT,
131    IFCGEOMODEL,
132    IFCGEOSLICE,
133    IFCGEOTECHNICALSTRATUM,
134    IFCHEATEXCHANGER,
135    IFCHUMIDIFIER,
136    IFCIMPACTPROTECTIONDEVICE,
137    IFCINTERCEPTOR,
138    IFCJUNCTIONBOX,
139    IFCKERB,
140    IFCLAMP,
141    IFCLIGHTFIXTURE,
142    IFCLIQUIDTERMINAL,
143    IFCMECHANICALFASTENER,
144    IFCMEDICALDEVICE,
145    IFCMEMBER,
146    IFCMOBILETELECOMMUNICATIONSAPPLIANCE,
147    IFCMOORINGDEVICE,
148    IFCMOTORCONNECTION,
149    IFCNAVIGATIONELEMENT,
150    IFCOPENINGELEMENT,
151    IFCOUTLET,
152    IFCPAVEMENT,
153    IFCPILE,
154    IFCPIPEFITTING,
155    IFCPIPESEGMENT,
156    IFCPLATE,
157    IFCPROJECTIONELEMENT,
158    IFCPROTECTIVEDEVICE,
159    IFCPROTECTIVEDEVICETRIPPINGUNIT,
160    IFCPUMP,
161    IFCRAIL,
162    IFCRAILING,
163    IFCRAMP,
164    IFCRAMPFLIGHT,
165    IFCREINFORCEDSOIL,
166    IFCREINFORCINGBAR,
167    IFCREINFORCINGMESH,
168    IFCROOF,
169    IFCSANITARYTERMINAL,
170    IFCSENSOR,
171    IFCSHADINGDEVICE,
172    IFCSIGN,
173    IFCSIGNAL,
174    IFCSLAB,
175    IFCSOLARDEVICE,
176    IFCSPACEHEATER,
177    IFCSTACKTERMINAL,
178    IFCSTAIR,
179    IFCSTAIRFLIGHT,
180    IFCSURFACEFEATURE,
181    IFCSWITCHINGDEVICE,
182    IFCSYSTEMFURNITUREELEMENT,
183    IFCTANK,
184    IFCTENDON,
185    IFCTENDONANCHOR,
186    IFCTENDONCONDUIT,
187    IFCTRACKELEMENT,
188    IFCTRANSFORMER,
189    IFCTRANSPORTELEMENT,
190    IFCTUBEBUNDLE,
191    IFCUNITARYCONTROLELEMENT,
192    IFCUNITARYEQUIPMENT,
193    IFCVALVE,
194    IFCVEHICLE,
195    IFCVIBRATIONDAMPER,
196    IFCVIBRATIONISOLATOR,
197    IFCVIRTUALELEMENT,
198    IFCVOIDINGFEATURE,
199    IFCWALL,
200    IFCWALLSTANDARDCASE,
201    IFCWASTETERMINAL,
202    IFCWINDOW,
203];