bimifc_model/lib.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5//! BIMIFC Model - Trait definitions and shared types for IFC parsing
6//!
7//! This crate provides the core abstractions for working with IFC (Industry Foundation Classes)
8//! files. It defines traits that can be implemented by different parser backends, allowing
9//! consumers to work with IFC data in a backend-agnostic way.
10//!
11//! # Architecture
12//!
13//! The crate is organized around several key traits:
14//!
15//! - [`IfcParser`] - Entry point for parsing IFC content
16//! - [`IfcModel`] - Read-only access to a parsed IFC model
17//! - [`EntityResolver`] - Entity lookup and reference resolution
18//! - [`PropertyReader`] - Access to property sets and quantities
19//! - [`SpatialQuery`] - Spatial hierarchy traversal and search
20//! - [`GeometrySource`] - Geometry data for rendering (optional extension)
21//!
22//! # Example
23//!
24//! ```ignore
25//! use bimifc_model::{IfcParser, IfcModel, EntityId};
26//!
27//! // Use any parser that implements IfcParser
28//! let parser: Box<dyn IfcParser> = get_parser();
29//! let model = parser.parse(ifc_content)?;
30//!
31//! // Access data through trait interfaces
32//! let resolver = model.resolver();
33//! if let Some(entity) = resolver.get(EntityId(123)) {
34//! println!("Entity type: {:?}", entity.ifc_type);
35//! }
36//! ```
37
38pub mod error;
39pub mod geometry;
40pub mod properties;
41pub mod resolver;
42pub mod spatial;
43pub mod traits;
44pub mod types;
45
46// Re-export all public types
47pub use error::*;
48pub use geometry::*;
49pub use properties::*;
50pub use resolver::*;
51pub use spatial::*;
52pub use traits::*;
53pub use types::*;