pub enum AttributeValue {
EntityRef(u32),
String(String),
Integer(i64),
Float(f64),
Enum(String),
List(Vec<AttributeValue>),
Null,
Derived,
}Expand description
IFC entity attribute value
Variants§
EntityRef(u32)
Entity reference
String(String)
String value
Integer(i64)
Integer value
Float(f64)
Float value
Enum(String)
Enum value
List(Vec<AttributeValue>)
List of values
Null
Null/undefined
Derived
Derived value (*)
Implementations§
Source§impl AttributeValue
impl AttributeValue
Sourcepub fn from_token(token: &Token<'_>) -> AttributeValue
pub fn from_token(token: &Token<'_>) -> AttributeValue
Convert from Token
Sourcepub fn as_entity_ref(&self) -> Option<u32>
pub fn as_entity_ref(&self) -> Option<u32>
Get as entity reference
Sourcepub fn as_float(&self) -> Option<f64>
pub fn as_float(&self) -> Option<f64>
Get as float Also handles TypedValue wrappers like IFCNORMALISEDRATIOMEASURE(0.5) which are stored as List([String(“typename”), Float(value)])
Sourcepub fn as_list(&self) -> Option<&[AttributeValue]>
pub fn as_list(&self) -> Option<&[AttributeValue]>
Get as list
Sourcepub fn parse_coordinate_list_3d(coord_list: &[AttributeValue]) -> Vec<f32>
pub fn parse_coordinate_list_3d(coord_list: &[AttributeValue]) -> Vec<f32>
Batch parse 3D coordinates from a list of coordinate triples Returns flattened f32 array: [x0, y0, z0, x1, y1, z1, …] Optimized for large coordinate lists
Sourcepub fn parse_coordinate_list_2d(coord_list: &[AttributeValue]) -> Vec<f32>
pub fn parse_coordinate_list_2d(coord_list: &[AttributeValue]) -> Vec<f32>
Batch parse 2D coordinates from a list of coordinate pairs Returns flattened f32 array: [x0, y0, x1, y1, …]
Sourcepub fn parse_index_list(face_list: &[AttributeValue]) -> Vec<u32>
pub fn parse_index_list(face_list: &[AttributeValue]) -> Vec<u32>
Batch parse triangle indices from a list of index triples Converts from 1-based IFC indices to 0-based indices Returns flattened u32 array: [i0, i1, i2, …]
Sourcepub fn parse_coordinate_list_3d_f64(
coord_list: &[AttributeValue],
) -> Vec<(f64, f64, f64)>
pub fn parse_coordinate_list_3d_f64( coord_list: &[AttributeValue], ) -> Vec<(f64, f64, f64)>
Batch parse coordinate list with f64 precision Returns Vec of (x, y, z) tuples
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnwindSafe for AttributeValue
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.