Parse() static private method

static private Parse ( string str, ReleaseVersion schema ) : IfcQuantityArea
str string
schema ReleaseVersion
return IfcQuantityArea
Esempio n. 1
0
        internal static IfcQuantityArea Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityArea q = new IfcQuantityArea();
            int             pos = 0, len = str.Length;

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

            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out q.mAreaValue))
            {
                if (s.StartsWith("IFCAREAMEASURE"))
                {
                    s = s.Substring(15, s.Length - 16);
                    double.TryParse(s, out q.mAreaValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
            return(q);
        }
Esempio n. 2
0
 internal static IfcQuantityArea Parse(string str, ReleaseVersion schema)
 {
     IfcQuantityArea q = new IfcQuantityArea();
     int pos = 0, len = str.Length;
     q.Parse(str, ref pos, len);
     string s = ParserSTEP.StripField(str, ref pos, len);
     if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out q.mAreaValue))
     {
         if (s.StartsWith("IFCAREAMEASURE"))
         {
             s = s.Substring(15, s.Length - 16);
             double.TryParse(s, out q.mAreaValue);
         }
     }
     if (schema != ReleaseVersion.IFC2x3)
         q.mFormula =  ParserSTEP.StripString(str, ref pos, len);
     return q;
 }