internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); if (xml.HasAttribute("ObjectType")) { ObjectType = xml.Attributes["ObjectType"].Value; } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "IsTypedBy") == 0) { mIsTypedBy = mDatabase.ParseXml <IfcRelDefinesByType>(child as XmlElement); } if (string.Compare(name, "IsDefinedBy") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelDefinesByProperties rd = mDatabase.ParseXml <IfcRelDefinesByProperties>(node as XmlElement); if (rd != null) { rd.AddRelated(this); } } } } }
protected IfcObject(DatabaseIfc db, IfcObject o, bool downStream) : base(db, o, downStream) //, bool downStream) : base(db, o, downStream) { mObjectType = o.mObjectType; foreach (IfcRelDefinesByProperties rdp in o.mIsDefinedBy) { IfcRelDefinesByProperties drdp = db.Factory.Duplicate(rdp) as IfcRelDefinesByProperties; drdp.AddRelated(this); } if (o.mIsTypedBy != null) { IsTypedBy = db.Factory.Duplicate(o.mIsTypedBy, false) as IfcRelDefinesByType; } }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); if (xml.HasAttribute("ObjectType")) { ObjectType = xml.Attributes["ObjectType"].Value; } if (xml.HasAttribute("LongName")) { LongName = xml.Attributes["LongName"].Value; } if (xml.HasAttribute("Phase")) { Phase = xml.Attributes["Phase"].Value; } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "RepresentationContexts") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcRepresentationContext rc = mDatabase.ParseXml <IfcRepresentationContext>(cn as XmlElement); if (rc != null) { addRepresentationContext(rc); } } } else if (string.Compare(name, "UnitsInContext") == 0) { UnitsInContext = mDatabase.ParseXml <IfcUnitAssignment>(child as XmlElement); } else if (string.Compare(name, "IsDefinedBy") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcRelDefinesByProperties rd = mDatabase.ParseXml <IfcRelDefinesByProperties>(cn as XmlElement); if (rd != null) { rd.AddRelated(this); } } } else if (string.Compare(name, "Declares") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcRelDeclares rd = mDatabase.ParseXml <IfcRelDeclares>(cn as XmlElement); if (rd != null) { rd.RelatingContext = this; } } } } if (this as IfcProjectLibrary == null || mDatabase.mContext == null) { mDatabase.mContext = this; } }