pub struct Task<'m> { /* private fields */ }Expand description
A borrowed view of an IfcTask, read against one release.
Implementations§
Source§impl<'m> Task<'m>
impl<'m> Task<'m>
Sourcepub fn new(
id: EntityId,
entity: &'m Entity,
release: SchemaVersion,
) -> Result<Self, ScheduleReadError>
pub fn new( id: EntityId, entity: &'m Entity, release: SchemaVersion, ) -> Result<Self, ScheduleReadError>
Wrap an entity known to be an IfcTask, read against release.
tasks binds the model’s declared release; use this when the
release is known some other way.
§Errors
ScheduleReadError::UnsupportedSchema for a release the readers
are not verified against (IFC4X1, IFC4X2).
Sourcepub fn release(&self) -> SchemaVersion
pub fn release(&self) -> SchemaVersion
The release this task is read against.
Sourcepub fn description(&self) -> Option<&'m str>
pub fn description(&self) -> Option<&'m str>
The short description.
Sourcepub fn identification(&self) -> Option<&'m str>
pub fn identification(&self) -> Option<&'m str>
The user-facing identification code, e.g. a WBS number: IFC4’s
Identification, IFC2X3’s TaskId.
Sourcepub fn long_description(&self) -> Option<&'m str>
pub fn long_description(&self) -> Option<&'m str>
The long description. None in IFC2X3, which declares none.
Sourcepub fn work_method(&self) -> Option<&'m str>
pub fn work_method(&self) -> Option<&'m str>
The work method.
Sourcepub fn is_milestone(&self) -> Option<bool>
pub fn is_milestone(&self) -> Option<bool>
Whether the task is a milestone.
Required by the schema, so None means the file omitted a mandatory
field rather than “not a milestone”.
Sourcepub fn predefined_type(&self) -> Option<&'m str>
pub fn predefined_type(&self) -> Option<&'m str>
The predefined type token, without its dots. None in IFC2X3,
which declares none.
Sourcepub fn task_time_ref(&self) -> Option<EntityId>
pub fn task_time_ref(&self) -> Option<EntityId>
The id this task’s TaskTime points at, if any. None in IFC2X3,
which declares no IfcTaskTime.
Sourcepub fn time(
&self,
model: &'m Model,
) -> (Option<TaskTime<'m>>, Vec<TaskTimeAnomaly>)
pub fn time( &self, model: &'m Model, ) -> (Option<TaskTime<'m>>, Vec<TaskTimeAnomaly>)
Resolve this task’s IfcTaskTime, or its IfcTaskTimeRecurring
subtype (#235); see TaskTime::recurrence.
Returns the view and any anomaly found while resolving it: a reference
to a non-IfcTaskTime, or a milestone that states a duration.
IFC2X3 declares no TaskTime; its tasks are timed by
Self::schedule_time_controls.
Source§impl<'m> Task<'m>
impl<'m> Task<'m>
Sourcepub fn schedule_time_controls(
&self,
model: &'m Model,
) -> (Vec<ScheduleTimeControl<'m>>, Vec<TaskTimeAnomaly>)
pub fn schedule_time_controls( &self, model: &'m Model, ) -> (Vec<ScheduleTimeControl<'m>>, Vec<TaskTimeAnomaly>)
The IFC2X3 IfcScheduleTimeControls assigned to this task through
IfcRelAssignsTasks.TimeForTask, in file order (#235).
A task timed in several work controls has one per assignment. Empty
in IFC4 and IFC4X3, which declare neither entity and time tasks
with Self::time. A TimeForTask that references anything but an
IfcScheduleTimeControl is reported as
TaskTimeAnomaly::NotAScheduleTimeControl, never read.