GeometryGym.Ifc.IfcContext.SetXML C# (CSharp) Method

SetXML() private method

private SetXML ( XmlElement xml, BaseClassIfc host, HashSet processed ) : void
xml XmlElement
host BaseClassIfc
processed HashSet
return void
		internal override void SetXML(XmlElement xml, BaseClassIfc host, HashSet<int> processed)
		{
			XmlElement repContexts = null;
			if (mRepresentationContexts.Count > 0)
			{
				repContexts = xml.OwnerDocument.CreateElement("RepresentationContexts");
				foreach (IfcRepresentationContext rc in RepresentationContexts)
					repContexts.AppendChild(rc.GetXML(xml.OwnerDocument, "", this, processed));
			}
			base.SetXML(xml, host, processed);
			setAttribute(xml, "ObjectType", ObjectType);
			setAttribute(xml, "LongName", LongName);
			setAttribute(xml, "Phase", Phase);
			if (repContexts != null)
				xml.AppendChild(repContexts);
			if (mUnitsInContext > 0)
				xml.AppendChild(UnitsInContext.GetXML(xml.OwnerDocument, "UnitsInContext", this, processed));
			if (mIsDefinedBy.Count > 0)
			{
				XmlElement element = xml.OwnerDocument.CreateElement("IsDefinedBy");
				xml.AppendChild(element);
				foreach (IfcRelDefines rd in IsDefinedBy)
					element.AppendChild(rd.GetXML(xml.OwnerDocument, "", this, processed));
			}
			if (mDeclares.Count > 0)
			{
				XmlElement element = xml.OwnerDocument.CreateElement("Declares");
				xml.AppendChild(element);
				foreach (IfcRelDeclares rd in Declares)
					element.AppendChild(rd.GetXML(xml.OwnerDocument, "", this, processed));
			}
		}
	}