public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: base.Parse(propIndex, value, nestedIndex); return; case 7: _benchmark = (IfcBenchmarkEnum)System.Enum.Parse(typeof(IfcBenchmarkEnum), value.EnumVal, true); return; case 8: _valueSource = value.StringVal; return; case 9: _dataValue = (IfcMetricValueSelect)(value.EntityVal); return; case 10: _referencePath = (IfcReference)(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: case 5: case 6: base.IfcParse(propIndex, value); break; case 7: _benchmark = (IfcBenchmarkEnum)Enum.Parse(typeof(IfcBenchmarkEnum), value.EnumVal); break; case 8: _valueSource = value.StringVal; break; case 9: _dataValue = (IfcMetricValueSelect)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcMetric(IfcLabel name, IfcText description, IfcConstraintEnum constraintGrade, IfcLabel constraintSource, IfcActorSelect creatingActor, IfcDateTime creationTime, IfcLabel userDefinedGrade, IfcBenchmarkEnum benchmark, IfcLabel valueSource, IfcMetricValueSelect dataValue, IfcReference referencePath) : base(name, description, constraintGrade, constraintSource, creatingActor, creationTime, userDefinedGrade) { Benchmark = benchmark; ValueSource = valueSource; DataValue = dataValue; ReferencePath = referencePath; }
public IfcMetric(IfcLabel __Name, IfcText?__Description, IfcConstraintEnum __ConstraintGrade, IfcLabel?__ConstraintSource, IfcActorSelect __CreatingActor, IfcDateTimeSelect __CreationTime, IfcLabel?__UserDefinedGrade, IfcBenchmarkEnum __Benchmark, IfcLabel?__ValueSource, IfcMetricValueSelect __DataValue) : base(__Name, __Description, __ConstraintGrade, __ConstraintSource, __CreatingActor, __CreationTime, __UserDefinedGrade) { this._Benchmark = __Benchmark; this._ValueSource = __ValueSource; this._DataValue = __DataValue; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: base.IfcParse(propIndex, value); break; case 7: _benchmark = (IfcBenchmarkEnum) Enum.Parse(typeof (IfcBenchmarkEnum), value.EnumVal); break; case 8: _valueSource = value.StringVal; break; case 9: _dataValue = (IfcMetricValueSelect) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
internal IfcMetric(IfcMetric m) : base(m) { mBenchMark = m.mBenchMark; mValueSource = m.mValueSource; mDataValue = m.mDataValue; mDataValueValue = m.mDataValueValue; mReferencePath = m.mReferencePath; }
} // optional /// <summary> /// Construct a IfcMetric with all required attributes. /// </summary> public IfcMetric(IfcLabel name, IfcConstraintEnum constraintGrade, IfcBenchmarkEnum benchmark) : base(name, constraintGrade) { Benchmark = benchmark; }
public static IfcSimplePropertyTemplate SetConstraint(this IfcSimplePropertyTemplate tmpl, IfcValue value, IfcBenchmarkEnum @operator) { var i = tmpl.Model.Instances; i.New <IfcRelAssociatesConstraint>(c => { c.RelatedObjects.Add(tmpl); c.RelatingConstraint = i.New <IfcMetric>(m => { m.Name = tmpl.Name + " constraint"; m.ConstraintGrade = Xbim.Ifc4.Interfaces.IfcConstraintEnum.NOTDEFINED; m.Benchmark = @operator; m.DataValue = value; }); }); return(tmpl); }