Esempio n. 1
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     if (xml.HasAttribute("Name"))
     {
         Name = xml.Attributes["Name"].Value;
     }
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "Rows") == 0)
         {
             foreach (XmlNode node in child.ChildNodes)
             {
                 IfcTableRow r = mDatabase.ParseXml <IfcTableRow>(node as XmlElement);
                 if (r != null)
                 {
                     addRow(r);
                 }
             }
         }
         else if (string.Compare(name, "Columns") == 0)
         {
             foreach (XmlNode node in child.ChildNodes)
             {
                 IfcTableColumn c = mDatabase.ParseXml <IfcTableColumn>(node as XmlElement);
                 if (c != null)
                 {
                     addColumn(c);
                 }
             }
         }
     }
 }
Esempio n. 2
0
		internal static IfcTableRow Parse(string strDef) { IfcTableRow t = new IfcTableRow(); int ipos = 0; parseFields(t, ParserSTEP.SplitLineFields(strDef), ref ipos); return t; }
Esempio n. 3
0
		internal static void parseFields(IfcTableRow t, List<string> arrFields, ref int ipos)
		{
			string s = arrFields[ipos++];
			if (s != "$")
			{
				List<string> ss = ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2));
				for (int icounter = 0; icounter < ss.Count; icounter++)
				{
					IfcValue v = ParserIfc.parseValue(ss[icounter]);
					if (v != null)
						t.mRowCells.Add(v);
				}
			}
			t.mIsHeading = ParserSTEP.ParseBool(arrFields[ipos++]);
		}
Esempio n. 4
0
		internal IfcTableRow(IfcTableRow o) : base() { mRowCells.AddRange(o.mRowCells); mIsHeading = o.mIsHeading; }