ifc_style/texture/
coordinate.rs1use ifc_model::{EntityId, Value};
4
5use crate::error::StyleResult;
6use crate::view::Record;
7
8#[derive(Debug, Clone, Copy)]
11pub struct TextureCoordinate<'m, 's> {
12 record: Record<'m, 's>,
13}
14
15impl<'m, 's> TextureCoordinate<'m, 's> {
16 pub(crate) fn from_record(record: Record<'m, 's>) -> Self {
17 Self { record }
18 }
19
20 pub fn id(&self) -> EntityId {
22 self.record.id
23 }
24
25 pub fn type_name(&self) -> &'m str {
28 &self.record.entity.type_name
29 }
30
31 pub fn mode(&self) -> StyleResult<Option<&'m str>> {
33 self.record.optional_text("Mode")
34 }
35
36 pub fn parameter(&self) -> StyleResult<Option<&'m Value>> {
38 self.record.optional_raw("Parameter")
39 }
40}