internal static IfcOwnerHistory Parse(string strDef) { IfcOwnerHistory o = new IfcOwnerHistory(); int ipos = 0; parseFields(o, ParserSTEP.SplitLineFields(strDef), ref ipos); return o; }
internal IfcOwnerHistory(IfcOwnerHistory o) : base() { mOwningUser = o.mOwningUser; mOwningApplication = o.mOwningApplication; mState = o.mState; mChangeAction = o.mChangeAction; mLastModifiedDate = o.mLastModifiedDate; mLastModifyingUser = o.mLastModifyingUser; mLastModifyingApplication = o.mLastModifyingApplication; mCreationDate = o.mCreationDate; }
internal static void parseFields(IfcOwnerHistory o, List<string> arrFields, ref int ipos) { o.mOwningUser = ParserSTEP.ParseLink(arrFields[ipos++]); o.mOwningApplication = ParserSTEP.ParseLink(arrFields[ipos++]); string str = arrFields[ipos++].Replace(".", ""); str = str.Trim(); if (str == "" || str.StartsWith("$")) o.mState = IfcStateEnum.NA; else o.mState = (IfcStateEnum)Enum.Parse(typeof(IfcStateEnum), str); str = arrFields[ipos++].Replace(".", ""); if (str.EndsWith("ADDED")) o.mChangeAction = IfcChangeActionEnum.ADDED; if (str.EndsWith("DELETED")) o.mChangeAction = IfcChangeActionEnum.DELETED; else o.mChangeAction = (IfcChangeActionEnum)Enum.Parse(typeof(IfcChangeActionEnum), str); o.mLastModifiedDate = ParserSTEP.ParseInt(arrFields[ipos++]); o.mLastModifyingUser = ParserSTEP.ParseLink(arrFields[ipos++]); o.mLastModifyingApplication = ParserSTEP.ParseLink(arrFields[ipos++]); o.mCreationDate = ParserSTEP.ParseInt(arrFields[ipos++]); }
internal IfcOwnerHistory OwnerHistory(IfcChangeActionEnum changeAction) { if(changeAction == IfcChangeActionEnum.ADDED) { if (mOwnerHistoryCreate == null) mOwnerHistoryCreate = new IfcOwnerHistory(PersonOrganization, Application, IfcChangeActionEnum.ADDED); return mOwnerHistoryCreate; } if(changeAction == IfcChangeActionEnum.DELETED) { if (mOwnerHistoryDelete == null) mOwnerHistoryDelete = new IfcOwnerHistory(PersonOrganization, Application, IfcChangeActionEnum.DELETED); return mOwnerHistoryDelete; } if(changeAction == IfcChangeActionEnum.MODIFIED) { if (mOwnerHistoryModify == null) mOwnerHistoryModify = new IfcOwnerHistory(PersonOrganization, Application, IfcChangeActionEnum.MODIFIED); return mOwnerHistoryModify; } return null; }