Exemple #1
0
        internal string xmlId()
        {
            string id = "";
            IfcClassificationReference classificationReference = this as IfcClassificationReference;

            if (classificationReference != null)
            {
                if (!string.IsNullOrEmpty(classificationReference.Identification))
                {
                    int    i   = 0;
                    string str = classificationReference.Identification;
                    if (str[0] == 'i' || str[0] == '_')
                    {
                        str = str.Substring(1);
                    }
                    if (!int.TryParse(str, out i))
                    {
                        id = classificationReference.Identification;
                    }
                }
            }
            if (string.IsNullOrEmpty(id))
            {
                return("i" + StepId);
            }
            if (char.IsDigit(id[0]))
            {
                return("_" + id);
            }
            return(id);
        }
Exemple #2
0
		internal static void parseFields(IfcClassificationReference r, List<string> arrFields, ref int ipos, Schema schema)
		{
			IfcExternalReference.parseFields(r, arrFields, ref ipos);
			r.mReferencedSource = ParserSTEP.ParseLink(arrFields[ipos++]);
			if (schema != Schema.IFC2x3)
			{
				r.mDescription = arrFields[ipos++].Replace("'", "");
				r.mSort = arrFields[ipos++].Replace("'", "");
			}
		}
Exemple #3
0
		internal static IfcClassificationReference Parse(string strDef, Schema schema) { IfcClassificationReference r = new IfcClassificationReference(); int ipos = 0; parseFields(r, ParserSTEP.SplitLineFields(strDef), ref ipos,schema); return r; }
Exemple #4
0
		internal IfcClassificationReference(IfcClassificationReference r) : base(r) { mReferencedSource = r.mReferencedSource; mDescription = r.mDescription; mSort = r.mSort; }