Exemple #1
0
        internal static BaseClassIfc ParseLine(string line, ReleaseVersion schema)
        {
            string kw = "", str = "";
            int    ifcID = 0;

            if (string.IsNullOrEmpty(line))
            {
                return(null);
            }
            string upper = line.ToUpper();

            if (line.Length < 5)
            {
                return(null);
            }
            ParserSTEP.GetKeyWord(line, out ifcID, out kw, out str);
            if (string.IsNullOrEmpty(kw) || !kw.ToUpper().StartsWith("IFC"))
            {
                return(null);
            }
            str = str.Trim();
            BaseClassIfc result = BaseClassIfc.LineParser(kw, str, schema);

            if (result == null)
            {
                return(null);
            }
            result.mSTEPString = str;
            result.mIndex      = ifcID;
            return(result);
        }
        internal static BaseClassIfc ParseLine(string line, ReleaseVersion schema, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            string kw = "", str = "";
            int    stepID = 0;

            ParserSTEP.GetKeyWord(line, out stepID, out kw, out str);
            if (string.IsNullOrEmpty(kw) || !kw.ToUpper().StartsWith("IFC"))
            {
                return(null);
            }
            str = str.Trim();
            ConcurrentDictionary <int, BaseClassIfc> dict = dictionary;

            if (dict == null)
            {
                dict    = new ConcurrentDictionary <int, BaseClassIfc>();
                dict[0] = null;
            }
            BaseClassIfc result = BaseClassIfc.LineParser(kw, str, schema, dict);

            if (result == null)
            {
                return(null);
            }
            result.mStepId = stepID;
            return(result);
        }