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); }
public IfcOwnerHistory(IfcPersonAndOrganization po, IfcApplication app, IfcChangeActionEnum ca) : base(po.mDatabase) { mOwningUser = po.mIndex; mOwningApplication = app.mIndex; mState = IfcStateEnum.NA; mChangeAction = ca; TimeSpan ts = DateTime.Now.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0); mCreationDate = (int)ts.TotalSeconds; mLastModifiedDate = (int)ts.TotalSeconds; }
public IfcOwnerHistory(IfcPersonAndOrganization __OwningUser, IfcApplication __OwningApplication, IfcStateEnum?__State, IfcChangeActionEnum __ChangeAction, IfcTimeStamp?__LastModifiedDate, IfcPersonAndOrganization __LastModifyingUser, IfcApplication __LastModifyingApplication, IfcTimeStamp __CreationDate) { this._OwningUser = __OwningUser; this._OwningApplication = __OwningApplication; this._State = __State; this._ChangeAction = __ChangeAction; this._LastModifiedDate = __LastModifiedDate; this._LastModifyingUser = __LastModifyingUser; this._LastModifyingApplication = __LastModifyingApplication; this._CreationDate = __CreationDate; }
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 IfcOwnerHistory OwnerHistory(IfcChangeActionEnum changeAction) { if (mOwnerHistories.ContainsKey(changeAction)) { return(mOwnerHistories[changeAction]); } IfcOwnerHistory result = new IfcOwnerHistory(PersonOrganization, Application, changeAction); mOwnerHistories.Add(changeAction, result); return(result); }
internal IfcOwnerHistory(DatabaseIfc db, IfcOwnerHistory o) : base(db) { OwningUser = db.Factory.Duplicate(o.OwningUser) as IfcPersonAndOrganization; OwningApplication = db.Factory.Duplicate(o.OwningApplication) as IfcApplication; mState = o.mState; mChangeAction = o.mChangeAction; mLastModifiedDate = o.mLastModifiedDate; mLastModifyingUser = o.mLastModifyingUser; mLastModifyingApplication = o.mLastModifyingApplication; mCreationDate = o.mCreationDate; }
public IfcOwnerHistory(IfcPersonAndOrganization owningUser, IfcApplication owningApplication, IfcStateEnum state, IfcChangeActionEnum changeAction, IfcTimeStamp lastModifiedDate, IfcPersonAndOrganization lastModifyingUser, IfcApplication lastModifyingApplication, IfcTimeStamp creationDate) : base() { OwningUser = owningUser; OwningApplication = owningApplication; State = state; ChangeAction = changeAction; LastModifiedDate = lastModifiedDate; LastModifyingUser = lastModifyingUser; LastModifyingApplication = lastModifyingApplication; CreationDate = creationDate; }
internal IfcOwnerHistory(IfcPersonAndOrganization po, IfcApplication app, IfcChangeActionEnum ca) : base(po.mDatabase) { mOwningUser = po.mIndex; mOwningApplication = app.mIndex; mState = IfcStateEnum.NA; mChangeAction = ca; TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0); //if(ca == IfcChangeActionEnum.ADDED) mCreationDate = (int)ts.TotalSeconds; //if (ca != IfcChangeActionEnum.NOTDEFINED) mLastModifiedDate = (int)ts.TotalSeconds; }
public OwnerHistory(IfcStore model, PersonOrgRelation personOrgRelation, Application application, IfcChangeActionEnum changeAction, int creationDate) { ifcOwnerHistory = model.Instances.New <IfcOwnerHistory>(p => { p.OwningUser = personOrgRelation.PersonAndOrganization; p.OwningApplication = application.IfcApplication; p.ChangeAction = changeAction; p.CreationDate = creationDate; }); this.personOrgRelation = personOrgRelation; this.application = application; this.changeAction = changeAction; this.creationDate = creationDate; }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _owningUser = (IfcPersonAndOrganization)value.EntityVal; break; case 1: _owningApplication = (IfcApplication)value.EntityVal; break; case 2: _state = (IfcStateEnum?)Enum.Parse(typeof(IfcStateEnum), value.EnumVal, true); break; case 3: _changeAction = (IfcChangeActionEnum)Enum.Parse(typeof(IfcChangeActionEnum), value.EnumVal, true); break; case 4: _lastModifiedDate = value.IntegerVal; break; case 5: _lastModifyingUser = (IfcPersonAndOrganization)value.EntityVal; break; case 6: _lastModifyingApplication = (IfcApplication)value.EntityVal; break; case 7: _creationDate = value.IntegerVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _owningUser = (IfcPersonAndOrganization)(value.EntityVal); return; case 1: _owningApplication = (IfcApplication)(value.EntityVal); return; case 2: _state = (IfcStateEnum)System.Enum.Parse(typeof(IfcStateEnum), value.EnumVal, true); return; case 3: _changeAction = (IfcChangeActionEnum)System.Enum.Parse(typeof(IfcChangeActionEnum), value.EnumVal, true); return; case 4: _lastModifiedDate = value.IntegerVal; return; case 5: _lastModifyingUser = (IfcPersonAndOrganization)(value.EntityVal); return; case 6: _lastModifyingApplication = (IfcApplication)(value.EntityVal); return; case 7: _creationDate = value.IntegerVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
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; }
internal IfcOwnerHistory OwnerHistory(IfcChangeActionEnum changeAction) { if (mOwnerHistories.ContainsKey(changeAction)) return mOwnerHistories[changeAction]; IfcOwnerHistory result = new IfcOwnerHistory(PersonOrganization, Application, changeAction); mOwnerHistories.Add(changeAction, result); return result; }
public static IfcOwnerHistory NewIfc4OwnerHistoryEntry(this IfcStore s, string version, IfcChangeActionEnum change = IfcChangeActionEnum.ADDED) { var newEntry = s.Instances.New <IfcOwnerHistory>(); newEntry.ChangeAction = change; var dateTime = (IfcTimeStamp)DateTime.Now; newEntry.CreationDate = dateTime; newEntry.LastModifiedDate = dateTime; newEntry.OwningUser = s.DefaultOwningUser as IfcPersonAndOrganization; newEntry.OwningApplication = s.DefaultOwningApplication as IfcApplication; return(newEntry); }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _owningUser = (IfcPersonAndOrganization) value.EntityVal; break; case 1: _owningApplication = (IfcApplication) value.EntityVal; break; case 2: _state = (IfcStateEnum?) Enum.Parse(typeof (IfcStateEnum), value.EnumVal, true); break; case 3: _changeAction = (IfcChangeActionEnum) Enum.Parse(typeof (IfcChangeActionEnum), value.EnumVal, true); break; case 4: _lastModifiedDate = value.IntegerVal; break; case 5: _lastModifyingUser = (IfcPersonAndOrganization) value.EntityVal; break; case 6: _lastModifyingApplication = (IfcApplication) value.EntityVal; break; case 7: _creationDate = value.IntegerVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
private IfcOwnerHistory GetNewOwnerHistory(IfcChangeActionEnum changeAction) { //existing default owner history IfcOwnerHistory defOwner = Model.OwnerHistoryAddObject as IfcOwnerHistory; IfcTimeStamp stamp = IfcTimeStamp.ToTimeStamp(DateTime.Now); //return new object return Model.Instances.New<IfcOwnerHistory>(h => { h.OwningUser = defOwner.OwningUser; h.OwningApplication = defOwner.OwningApplication; h.CreationDate = stamp; h.ChangeAction = changeAction; }); }
private IfcOwnerHistory NewOwnerHistoryEntry(string version, IfcChangeActionEnum change) { IfcOwnerHistory newVersion = Store.NewIfc4OwnerHistoryEntry(version, change); return(newVersion); }