コード例 #1
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 4:
                _predefinedType = (IfcServiceLifeFactorTypeEnum)System.Enum.Parse(typeof(IfcServiceLifeFactorTypeEnum), value.EnumVal, true);
                return;

            case 5:
                _upperValue = (IfcMeasureValue)(value.EntityVal);
                return;

            case 6:
                _mostUsedValue = (IfcMeasureValue)(value.EntityVal);
                return;

            case 7:
                _lowerValue = (IfcMeasureValue)(value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
コード例 #2
0
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
                base.IfcParse(propIndex, value);
                break;

            case 4:
                _PredefinedType = (IfcServiceLifeFactorTypeEnum)Enum.Parse(typeof(IfcServiceLifeFactorTypeEnum), value.EnumVal);
                break;

            case 5:
                _UpperValue = (IfcMeasureValue)value.EntityVal;
                break;

            case 6:
                _MostUsedValue = (IfcMeasureValue)value.EntityVal;
                break;

            case 7:
                _LowerValue = (IfcMeasureValue)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
コード例 #3
0
 public IfcServiceLifeFactor(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcServiceLifeFactorTypeEnum __PredefinedType, IfcMeasureValue __UpperValue, IfcMeasureValue __MostUsedValue, IfcMeasureValue __LowerValue)
     : base(__GlobalId, __OwnerHistory, __Name, __Description)
 {
     this._PredefinedType = __PredefinedType;
     this._UpperValue     = __UpperValue;
     this._MostUsedValue  = __MostUsedValue;
     this._LowerValue     = __LowerValue;
 }
コード例 #4
0
        internal static IfcValue parseValue(string str)
        {
            IfcMeasureValue mv = parseMeasureValue(str);

            if (mv != null)
            {
                return(mv);
            }
            IfcSimpleValue sv = parseSimpleValue(str);

            if (sv != null)
            {
                return(sv);
            }
            return(parseDerivedMeasureValue(str));
        }
コード例 #5
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mWeightValue))
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
                if (mv != null)
                {
                    mWeightValue = mv.Measure;
                }
            }
            if (release > ReleaseVersion.IFC2x3)
            {
                mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            }
        }
コード例 #6
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, out mVolumeValue))
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
                if (mv != null)
                {
                    mVolumeValue = mv.Measure;
                }
            }
            if (release != ReleaseVersion.IFC2x3)
            {
                mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
        }
コード例 #7
0
        internal static IfcValue parseValue(string str)
        {
            if (string.Compare(str, "$", true) == 0)
            {
                return(null);
            }
            IfcMeasureValue mv = parseMeasureValue(str);

            if (mv != null)
            {
                return(mv);
            }
            IfcSimpleValue sv = parseSimpleValue(str);

            if (sv != null)
            {
                return(sv);
            }
            return(parseDerivedMeasureValue(str));
        }
コード例 #8
0
ファイル: IFC Q.cs プロジェクト: jddaigle/GeometryGymIFC
        internal static IfcQuantityWeight Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityWeight q = new IfcQuantityWeight();
            int pos = 0, len = str.Length;

            q.Parse(str, ref pos, len);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, out q.mWeightValue))
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
                if (mv != null)
                {
                    q.mWeightValue = mv.Measure;
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
            return(q);
        }
コード例 #9
0
ファイル: IFC Q.cs プロジェクト: xxxhycl2010/GeometryGymIFC
        internal static void parseFields(IfcQuantityVolume q, List <string> arrFields, ref int ipos, ReleaseVersion schema)
        {
            IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos);
            string str = arrFields[ipos++];
            double vol;

            if (double.TryParse(str, out vol))
            {
                q.mVolumeValue = vol;
            }
            else
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(str);
                if (mv != null)
                {
                    q.mVolumeValue = mv.Measure;
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = arrFields[ipos++].Replace("'", "");
            }
        }
コード例 #10
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
         case 3:
             base.IfcParse(propIndex, value);
             break;
         case 4:
             _PredefinedType = (IfcServiceLifeFactorTypeEnum)Enum.Parse(typeof(IfcServiceLifeFactorTypeEnum), value.EnumVal);
             break;
         case 5:
             _UpperValue = (IfcMeasureValue)value.EntityVal;
             break;
         case 6:
             _MostUsedValue = (IfcMeasureValue)value.EntityVal;
             break;
         case 7:
             _LowerValue = (IfcMeasureValue)value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }