#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum XmlProfile {
Ifc4Add2Tc1,
Ifc4x3Add2,
}
impl XmlProfile {
#[must_use]
pub const fn namespace(self) -> &'static str {
match self {
Self::Ifc4Add2Tc1 => {
"https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/XML"
}
Self::Ifc4x3Add2 => "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/3/ADD2",
}
}
#[must_use]
pub const fn namespaces(self) -> &'static [&'static str] {
match self {
Self::Ifc4Add2Tc1 => &[
"https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/XML",
"http://www.buildingsmart-tech.org/ifcXML/IFC4/Add2",
],
Self::Ifc4x3Add2 => &["https://standards.buildingsmart.org/IFC/RELEASE/IFC4/3/ADD2"],
}
}
#[must_use]
pub const fn schema_token(self) -> &'static str {
match self {
Self::Ifc4Add2Tc1 => "IFC4",
Self::Ifc4x3Add2 => "IFC4X3_ADD2",
}
}
#[cfg(feature = "schema")]
#[must_use]
pub const fn version(self) -> ifc_schema::SchemaVersion {
match self {
Self::Ifc4Add2Tc1 => ifc_schema::SchemaVersion::Ifc4,
Self::Ifc4x3Add2 => ifc_schema::SchemaVersion::Ifc4x3,
}
}
}