Exemplo n.º 1
0
        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()));
            }
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 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;
     }
 }
Exemplo n.º 6
0
		internal IfcMetric(IfcMetric m) : base(m) { mBenchMark = m.mBenchMark; mValueSource = m.mValueSource; mDataValue = m.mDataValue; mDataValueValue = m.mDataValueValue; mReferencePath = m.mReferencePath; }
Exemplo n.º 7
0
        }                                                   // optional


        /// <summary>
        /// Construct a IfcMetric with all required attributes.
        /// </summary>
        public IfcMetric(IfcLabel name, IfcConstraintEnum constraintGrade, IfcBenchmarkEnum benchmark) : base(name, constraintGrade)
        {
            Benchmark = benchmark;
        }
Exemplo n.º 8
0
        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);
        }