Наследование: BaseClassIfc, IfcDateTimeSelect
Пример #1
0
        public Tuple <DateTime, DateTime> ComputeAndSetScheduledStartFinishTimes()
        {
            DateTime scheduledStart = DateTime.MaxValue, scheduledFinish = DateTime.MinValue;
            List <IfcWorkControl> subControls = IsDecomposedBy.SelectMany(x => x.RelatedObjects).OfType <IfcWorkControl>().ToList();

            subControls.AddRange(IsNestedBy.SelectMany(x => x.RelatedObjects).OfType <IfcWorkControl>());
            foreach (IfcWorkControl workControl in subControls)
            {
                Tuple <DateTime, DateTime> startFinish = workControl.ComputeAndSetScheduledStartFinishTimes();
                if (startFinish.Item1 != DateTime.MinValue && startFinish.Item1 < scheduledStart)
                {
                    scheduledStart = startFinish.Item1;
                }
                if (startFinish.Item2 > scheduledFinish)
                {
                    scheduledFinish = startFinish.Item2;
                }
            }
            foreach (IfcTask task in Controls.SelectMany(x => x.RelatedObjects).OfType <IfcTask>())
            {
                Tuple <DateTime, DateTime> startFinish = task.computeScheduleStartFinish();
                if (startFinish.Item1 != DateTime.MinValue && startFinish.Item1 < scheduledStart)
                {
                    scheduledStart = startFinish.Item1;
                }
                if (startFinish.Item2 > scheduledFinish)
                {
                    scheduledFinish = startFinish.Item2;
                }
            }
            if (mDatabase.Release > ReleaseVersion.IFC2x3)
            {
                mStartTime  = scheduledStart;
                mFinishTime = scheduledFinish;
            }
            else
            {
                if (scheduledStart > DateTime.MinValue)
                {
                    mSSStartTime = new IfcDateAndTime(mDatabase, scheduledStart);
                }
                if (scheduledFinish > DateTime.MinValue)
                {
                    mSSFinishTime = new IfcDateAndTime(mDatabase, scheduledFinish);
                }
            }
            return(new Tuple <DateTime, DateTime>(scheduledStart, scheduledFinish));
        }
Пример #2
0
		internal static IfcDateAndTime Parse(string strDef) { IfcDateAndTime d = new IfcDateAndTime(); int ipos = 0; parseFields(d, ParserSTEP.SplitLineFields(strDef), ref ipos); return d; }
Пример #3
0
		internal static void parseFields(IfcDateAndTime d, List<string> arrFields, ref int ipos) { d.mDateComponent = ParserSTEP.ParseLink(arrFields[ipos++]); d.mTimeComponent = ParserSTEP.ParseLink(arrFields[ipos++]); }
Пример #4
0
		internal int mTimeComponent;// : IfcLocalTime;
		internal IfcDateAndTime(IfcDateAndTime v) : base() { mDateComponent = v.mDateComponent; mTimeComponent = v.mTimeComponent; }