public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _version = value.StringVal; break; case 2: _publisher = (IfcOrganization)value.EntityVal; break; case 3: _versionDate = (IfcCalendarDate)value.EntityVal; break; case 4: if (_libraryReference == null) { _libraryReference = new XbimSet <IfcLibraryReference>(this); } ((IXbimNoNotifyCollection)_libraryReference).Add((IfcLibraryReference)value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _name = value.StringVal; return; case 1: _version = value.StringVal; return; case 2: _publisher = (IfcOrganization)(value.EntityVal); return; case 3: _versionDate = (IfcCalendarDate)(value.EntityVal); return; case 4: _libraryReference.InternalAdd((IfcLibraryReference)value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcClassification(IfcLabel __Source, IfcLabel __Edition, IfcCalendarDate __EditionDate, IfcLabel __Name) { this._Source = __Source; this._Edition = __Edition; this._EditionDate = __EditionDate; this._Name = __Name; }
public IfcLibraryInformation(IfcLabel __Name, IfcLabel?__Version, IfcOrganization __Publisher, IfcCalendarDate __VersionDate, IfcLibraryReference[] __LibraryReference) { this._Name = __Name; this._Version = __Version; this._Publisher = __Publisher; this._VersionDate = __VersionDate; this._LibraryReference = new HashSet <IfcLibraryReference>(__LibraryReference); }
/// <summary> /// Initilialises date to the current date on this computer expressed in local time /// </summary> /// <param name = "cd"></param> public static void MakeNow(this IfcCalendarDate cd) { DateTime now = DateTime.Now; cd.DayComponent = now.Day; cd.MonthComponent = now.Month; cd.YearComponent = now.Year; }
public IfcInventory(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcInventoryTypeEnum __InventoryType, IfcActorSelect __Jurisdiction, IfcPerson[] __ResponsiblePersons, IfcCalendarDate __LastUpdateDate, IfcCostValue __CurrentValue, IfcCostValue __OriginalValue) : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType) { this._InventoryType = __InventoryType; this._Jurisdiction = __Jurisdiction; this._ResponsiblePersons = new HashSet <IfcPerson>(__ResponsiblePersons); this._LastUpdateDate = __LastUpdateDate; this._CurrentValue = __CurrentValue; this._OriginalValue = __OriginalValue; }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.Parse(propIndex, value, nestedIndex); return; case 5: _assetID = value.StringVal; return; case 6: _originalValue = (IfcCostValue)(value.EntityVal); return; case 7: _currentValue = (IfcCostValue)(value.EntityVal); return; case 8: _totalReplacementCost = (IfcCostValue)(value.EntityVal); return; case 9: _owner = (IfcActorSelect)(value.EntityVal); return; case 10: _user = (IfcActorSelect)(value.EntityVal); return; case 11: _responsiblePerson = (IfcPerson)(value.EntityVal); return; case 12: _incorporationDate = (IfcCalendarDate)(value.EntityVal); return; case 13: _depreciatedValue = (IfcCostValue)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _AssetID = value.StringVal; break; case 6: _OriginalValue = (IfcCostValue)value.EntityVal; break; case 7: _CurrentValue = (IfcCostValue)value.EntityVal; break; case 8: _TotalReplacementCost = (IfcCostValue)value.EntityVal; break; case 9: _Owner = (IfcActorSelect)value.EntityVal; break; case 10: _User = (IfcActorSelect)value.EntityVal; break; case 11: _ResponsiblePerson = (IfcPerson)value.EntityVal; break; case 12: _IncorporationDate = (IfcCalendarDate)value.EntityVal; break; case 13: _DepreciatedValue = (IfcCostValue)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcAsset(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcIdentifier __AssetID, IfcCostValue __OriginalValue, IfcCostValue __CurrentValue, IfcCostValue __TotalReplacementCost, IfcActorSelect __Owner, IfcActorSelect __User, IfcPerson __ResponsiblePerson, IfcCalendarDate __IncorporationDate, IfcCostValue __DepreciatedValue) : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType) { this._AssetID = __AssetID; this._OriginalValue = __OriginalValue; this._CurrentValue = __CurrentValue; this._TotalReplacementCost = __TotalReplacementCost; this._Owner = __Owner; this._User = __User; this._ResponsiblePerson = __ResponsiblePerson; this._IncorporationDate = __IncorporationDate; this._DepreciatedValue = __DepreciatedValue; }
internal IfcInventory(DatabaseIfc db, IfcInventory i, DuplicateOptions options) : base(db, i, options) { PredefinedType = i.PredefinedType; mJurisdiction = db.Factory.Duplicate(i.mJurisdiction, options); mResponsiblePersons.AddRange(i.mResponsiblePersons.Select(x => db.Factory.Duplicate(x, options))); mLastUpdateDate = i.mLastUpdateDate; if (mLastUpdateDateSS != null) { mLastUpdateDateSS = db.Factory.Duplicate(i.mLastUpdateDateSS, options); } if (i.mCurrentValue != null) { mCurrentValue = db.Factory.Duplicate(i.mCurrentValue, options); } if (i.mOriginalValue != null) { mOriginalValue = db.Factory.Duplicate(i.mOriginalValue, options); } }
public IfcDocumentInformation(IfcIdentifier __DocumentId, IfcLabel __Name, IfcText?__Description, IfcDocumentReference[] __DocumentReferences, IfcText?__Purpose, IfcText?__IntendedUse, IfcText?__Scope, IfcLabel?__Revision, IfcActorSelect __DocumentOwner, IfcActorSelect[] __Editors, IfcDateAndTime __CreationTime, IfcDateAndTime __LastRevisionTime, IfcDocumentElectronicFormat __ElectronicFormat, IfcCalendarDate __ValidFrom, IfcCalendarDate __ValidUntil, IfcDocumentConfidentialityEnum?__Confidentiality, IfcDocumentStatusEnum?__Status) { this._DocumentId = __DocumentId; this._Name = __Name; this._Description = __Description; this._DocumentReferences = new HashSet <IfcDocumentReference>(__DocumentReferences); this._Purpose = __Purpose; this._IntendedUse = __IntendedUse; this._Scope = __Scope; this._Revision = __Revision; this._DocumentOwner = __DocumentOwner; this._Editors = new HashSet <IfcActorSelect>(__Editors); this._CreationTime = __CreationTime; this._LastRevisionTime = __LastRevisionTime; this._ElectronicFormat = __ElectronicFormat; this._ValidFrom = __ValidFrom; this._ValidUntil = __ValidUntil; this._Confidentiality = __Confidentiality; this._Status = __Status; }
internal static bool IfcValidCalendarDate(IfcCalendarDate date) { // using c# classes instead of express var day = date.DayComponent; if (day < 1) { return(false); } var month = (int)date.MonthComponent; if (month < 1 || month > 12) { return(false); } var year = (int)date.YearComponent; return(day <= DateTime.DaysInMonth(year, month)); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.Parse(propIndex, value, nestedIndex); return; case 5: _inventoryType = (IfcInventoryTypeEnum)System.Enum.Parse(typeof(IfcInventoryTypeEnum), value.EnumVal, true); return; case 6: _jurisdiction = (IfcActorSelect)(value.EntityVal); return; case 7: _responsiblePersons.InternalAdd((IfcPerson)value.EntityVal); return; case 8: _lastUpdateDate = (IfcCalendarDate)(value.EntityVal); return; case 9: _currentValue = (IfcCostValue)(value.EntityVal); return; case 10: _originalValue = (IfcCostValue)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _InventoryType = (IfcInventoryTypeEnum)Enum.Parse(typeof(IfcInventoryTypeEnum), value.EnumVal); break; case 6: _Jurisdiction = (IfcActorSelect)value.EntityVal; break; case 7: _ResponsiblePersons.Add((IfcPerson)value.EntityVal); break; case 8: _LastUpdateDate = (IfcCalendarDate)value.EntityVal; break; case 9: _CurrentValue = (IfcCostValue)value.EntityVal; break; case 10: _OriginalValue = (IfcCostValue)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
/// <summary> /// Get the string value for the IfcDateTimeSelect /// </summary> /// <param name="ifcDateTimeSelect">IfcDateTimeSelect</param> /// <returns>string</returns> public static string GetAsString(this IfcDateTimeSelect ifcDateTimeSelect) { if (ifcDateTimeSelect is IfcDateAndTime) { IfcDateAndTime datetime = (ifcDateTimeSelect as IfcDateAndTime); int minute = 0; if (datetime.TimeComponent.MinuteComponent.HasValue) { minute = (int)datetime.TimeComponent.MinuteComponent.Value; } int second = 0; if (datetime.TimeComponent.SecondComponent.HasValue) { second = (int)datetime.TimeComponent.SecondComponent.Value; } return(new DateTime(datetime.DateComponent.YearComponent, datetime.DateComponent.MonthComponent, datetime.DateComponent.DayComponent, datetime.TimeComponent.HourComponent, minute, second).ToString()); } if (ifcDateTimeSelect is IfcCalendarDate) { IfcCalendarDate date = (ifcDateTimeSelect as IfcCalendarDate); return(new DateTime(date.YearComponent, date.MonthComponent, date.DayComponent).ToString("d")); } if (ifcDateTimeSelect is IfcLocalTime) { IfcLocalTime time = (ifcDateTimeSelect as IfcLocalTime); int minute = 0; if (time.MinuteComponent.HasValue) { minute = (int)time.MinuteComponent.Value; } int second = 0; if (time.SecondComponent.HasValue) { second = (int)time.SecondComponent.Value; } return(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, time.HourComponent, minute, second).ToString("HH:mm:ss")); } return(string.Empty); }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _source = value.StringVal; break; case 1: _edition = value.StringVal; break; case 2: _editionDate = (IfcCalendarDate)value.EntityVal; break; case 3: _name = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _source = value.StringVal; return; case 1: _edition = value.StringVal; return; case 2: _editionDate = (IfcCalendarDate)(value.EntityVal); return; case 3: _name = value.StringVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public static void SetDate(this IfcCalendarDate cd, int day, int month, int year) { cd.DayComponent = day; cd.MonthComponent = month; cd.YearComponent = year; }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _documentId = value.StringVal; return; case 1: _name = value.StringVal; return; case 2: _description = value.StringVal; return; case 3: _documentReferences.InternalAdd((IfcDocumentReference)value.EntityVal); return; case 4: _purpose = value.StringVal; return; case 5: _intendedUse = value.StringVal; return; case 6: _scope = value.StringVal; return; case 7: _revision = value.StringVal; return; case 8: _documentOwner = (IfcActorSelect)(value.EntityVal); return; case 9: _editors.InternalAdd((IfcActorSelect)value.EntityVal); return; case 10: _creationTime = (IfcDateAndTime)(value.EntityVal); return; case 11: _lastRevisionTime = (IfcDateAndTime)(value.EntityVal); return; case 12: _electronicFormat = (IfcDocumentElectronicFormat)(value.EntityVal); return; case 13: _validFrom = (IfcCalendarDate)(value.EntityVal); return; case 14: _validUntil = (IfcCalendarDate)(value.EntityVal); return; case 15: _confidentiality = (IfcDocumentConfidentialityEnum)System.Enum.Parse(typeof(IfcDocumentConfidentialityEnum), value.EnumVal, true); return; case 16: _status = (IfcDocumentStatusEnum)System.Enum.Parse(typeof(IfcDocumentStatusEnum), value.EnumVal, true); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public static string ToISODateTimeString(this IfcCalendarDate calendarDate) { var dateTime = new DateTime((int)calendarDate.YearComponent, (int)calendarDate.MonthComponent, (int)calendarDate.DayComponent); return(dateTime.ToString("yyyy-MM-ddThh:mm:ss")); //cannot be any milliseconds as no time component so omit }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _documentId = value.StringVal; break; case 1: _name = value.StringVal; break; case 2: _description = value.StringVal; break; case 3: if (_documentReferences == null) { _documentReferences = new XbimSet <IfcDocumentReference>(this); } ((IXbimNoNotifyCollection)_documentReferences).Add((IfcDocumentReference)value.EntityVal); break; case 4: _purpose = value.StringVal; break; case 5: _intendedUse = value.StringVal; break; case 6: _scope = value.StringVal; break; case 7: _revision = value.StringVal; break; case 8: _documentOwner = (IfcActorSelect)value.EntityVal; break; case 9: if (_editors == null) { _editors = new XbimSet <IfcActorSelect>(this); } ((IXbimNoNotifyCollection)_editors).Add((IfcActorSelect)value.EntityVal); break; case 10: _creationTime = (IfcDateAndTime)value.EntityVal; break; case 11: _lastRevisionTime = (IfcDateAndTime)value.EntityVal; break; case 12: _electronicFormat = (IfcDocumentElectronicFormat)value.EntityVal; break; case 13: _validFrom = (IfcCalendarDate)value.EntityVal; break; case 14: _validUntil = (IfcCalendarDate)value.EntityVal; break; case 15: _confidentiality = (IfcDocumentConfidentialityEnum) Enum.Parse(typeof(IfcDocumentConfidentialityEnum), value.EnumVal, true); break; case 16: _status = (IfcDocumentStatusEnum)Enum.Parse(typeof(IfcDocumentStatusEnum), value.EnumVal, true); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }