Skip to main content

PropertyTemplate

Struct PropertyTemplate 

Source
#[non_exhaustive]
pub struct PropertyTemplate {
Show 14 fields pub id: EntityId, pub name: Option<Arc<str>>, pub description: Option<Arc<str>>, pub kind: PropertyTemplateKind, pub template_type: Option<Arc<str>>, pub primary_measure: Option<Arc<str>>, pub secondary_measure: Option<Arc<str>>, pub enumerators: Option<EntityId>, pub primary_unit: Option<EntityId>, pub secondary_unit: Option<EntityId>, pub expression: Option<Arc<str>>, pub access_state: Option<Arc<str>>, pub usage_name: Option<Arc<str>>, pub templates: Vec<PropertyTemplate>,
}
Expand description

A property template: what one property should look like.

Every attribute of both template entities has a field; the ones the entity does not declare are None (or empty). Enumeration constants are as written in the file, without their dots.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: EntityId

The entity.

§name: Option<Arc<str>>

Name: the property name this template governs.

§description: Option<Arc<str>>

Description.

§kind: PropertyTemplateKind

Simple or complex.

§template_type: Option<Arc<str>>

TemplateType: an IfcSimplePropertyTemplateTypeEnum constant such as P_SINGLEVALUE for a simple template, an IfcComplexPropertyTemplateTypeEnum constant (P_COMPLEX, Q_COMPLEX) for a complex one.

This states which IfcProperty or IfcPhysicalQuantity subtype an instance should use, so it is the link between a template and the property families in pset.

§primary_measure: Option<Arc<str>>

PrimaryMeasureType, e.g. IfcLengthMeasure (simple only).

§secondary_measure: Option<Arc<str>>

SecondaryMeasureType, used by bounded and table values (simple only).

§enumerators: Option<EntityId>

Enumerators: the IfcPropertyEnumeration an enumerated value selects from (simple only).

§primary_unit: Option<EntityId>

PrimaryUnit (simple only).

§secondary_unit: Option<EntityId>

SecondaryUnit, the defined unit of a table value (simple only).

§expression: Option<Arc<str>>

Expression: a table’s correlation or a quantity’s formula (simple only).

§access_state: Option<Arc<str>>

AccessState, an IfcStateEnum constant such as READONLY (simple only).

§usage_name: Option<Arc<str>>

UsageName (complex only).

§templates: Vec<PropertyTemplate>

HasPropertyTemplates, in file order (complex only; empty when $).

Members the traversal refuses (cycle, depth, budget, absent entity, non-template) are left out; the checked readers report each one.

Implementations§

Source§

impl PropertyTemplate

Source

pub fn template(&self, name: &str) -> Option<&PropertyTemplate>

Look up a nested template of a complex template by name.

Trait Implementations§

Source§

impl Clone for PropertyTemplate

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PropertyTemplate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PropertyTemplate

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PropertyTemplate

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.