Example #1
0
 internal IfcWorkTime(DatabaseIfc db, IfcRecurrencePattern recur, DateTime start, DateTime finish)
     : base(db)
 {
     if (recur != null) mRecurrencePattern = recur.mIndex; if (start != DateTime.MinValue) mStart = IfcDate.convert(start); if (finish != DateTime.MinValue) mFinish = IfcDate.convert(finish);
 }
Example #2
0
		internal static void parseFields(IfcRecurrencePattern m, List<string> arrFields, ref int ipos)
		{
			m.mRecurrenceType = (IfcRecurrenceTypeEnum)Enum.Parse(typeof(IfcRecurrenceTypeEnum), arrFields[ipos++].Replace(".", ""));
			string s = arrFields[ipos++];
			if (s.StartsWith("("))
				m.mDayComponent = ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)).ConvertAll(x => int.Parse(x));
			s = arrFields[ipos++];
			if (s.StartsWith("("))
				m.mWeekdayComponent = ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)).ConvertAll(x => int.Parse(x));
			s = arrFields[ipos++];
			if (s.StartsWith("("))
				m.mMonthComponent = ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)).ConvertAll(x => int.Parse(x));
			s = arrFields[ipos++];
			if (s != "$")
				m.mPosition = int.Parse(s);
			s = arrFields[ipos++];
			if (s != "$")
				m.mInterval = int.Parse(s);
			s = arrFields[ipos++];
			if (s != "$")
				m.mOccurrences = int.Parse(s);
			m.mTimePeriods = ParserSTEP.SplitListLinks(arrFields[ipos++]);
		}
Example #3
0
		internal IfcRecurrencePattern(IfcRecurrencePattern p) : base()
		{
			mRecurrenceType = p.mRecurrenceType;
			mDayComponent.AddRange(p.mDayComponent);
			mWeekdayComponent.AddRange(p.mWeekdayComponent);
			mMonthComponent.AddRange(p.mMonthComponent);
			mPosition = p.mPosition;
			mInterval = p.mInterval;
			mOccurrences = p.mOccurrences;
			mTimePeriods.AddRange(p.mTimePeriods);
		}
Example #4
0
		internal static IfcRecurrencePattern Parse(string strDef) { IfcRecurrencePattern m = new IfcRecurrencePattern(); int ipos = 0; parseFields(m, ParserSTEP.SplitLineFields(strDef), ref ipos); return m; }
Example #5
0
		internal IfcWorkTime(DatabaseIfc m, string name, IfcDataOriginEnum origin, string userOrigin, IfcRecurrencePattern recur, DateTime start, DateTime finish)
			: base(m, name, origin, userOrigin) { if (recur != null) mRecurrencePattern = recur.mIndex; if (start != DateTime.MinValue) mStart = IfcDate.convert(start); if (finish != DateTime.MinValue) mFinish = IfcDate.convert(finish); }