public void AddAddress(IfcAddress address) { if (address != null) { mAddresses.Add(address.mIndex); } }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); if (xml.HasAttribute("Identification")) { Identification = xml.Attributes["Identification"].Value; } if (xml.HasAttribute("Name")) { Name = xml.Attributes["Name"].Value; } if (xml.HasAttribute("Description")) { Description = xml.Attributes["Description"].Value; } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "Roles", true) == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcActorRole role = mDatabase.ParseXml <IfcActorRole>(cn as XmlElement); if (role != null) { Roles.Add(role); } } } else if (string.Compare(name, "Addresses", true) == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcAddress address = mDatabase.ParseXml <IfcAddress>(cn as XmlElement); if (address != null) { Addresses.Add(address); } } } else if (string.Compare(name, "Identification", true) == 0) { Identification = child.InnerText; } else if (string.Compare(name, "Name", true) == 0) { Name = child.InnerText; } else if (string.Compare(name, "Description", true) == 0) { Description = child.InnerText; } else if (string.Compare(name, "Id", true) == 0) { Identification = child.InnerText; } } }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); if (xml.HasAttribute("Identification")) { Identification = xml.Attributes["Identification"].Value; } if (xml.HasAttribute("FamilyName")) { FamilyName = xml.Attributes["FamilyName"].Value; } if (xml.HasAttribute("GivenName")) { GivenName = xml.Attributes["GivenName"].Value; } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "MiddleNames") == 0) { List <string> names = new List <string>(child.ChildNodes.Count); foreach (XmlNode cn in child.ChildNodes) { names.Add(cn.InnerText); } MiddleNames = names; } else if (string.Compare(name, "Roles") == 0) { List <IfcActorRole> roles = new List <IfcActorRole>(child.ChildNodes.Count); foreach (XmlNode cn in child.ChildNodes) { IfcActorRole role = mDatabase.ParseXml <IfcActorRole>(cn as XmlElement); if (role != null) { roles.Add(role); } } Roles = roles; } else if (string.Compare(name, "Addresses") == 0) { List <IfcAddress> addresses = new List <IfcAddress>(child.ChildNodes.Count); foreach (XmlNode cn in child.ChildNodes) { IfcAddress address = mDatabase.ParseXml <IfcAddress>(cn as XmlElement); if (address != null) { addresses.Add(address); } } Addresses = addresses; } } }
internal static void parseFields(IfcAddress a, List<string> arrFields, ref int ipos) { string str = arrFields[ipos++]; if (str != "$") a.mPurpose = (IfcAddressTypeEnum)Enum.Parse(typeof(IfcAddressTypeEnum), str.Replace(".", "")); a.mDescription = arrFields[ipos++].Replace("'", ""); a.mUserDefinedPurpose = arrFields[ipos++].Replace("'", ""); }
protected IfcAddress(IfcAddress o) : base() { mPurpose = o.mPurpose; mDescription = o.mDescription; mUserDefinedPurpose = o.mUserDefinedPurpose; }
protected IfcAddress(DatabaseIfc db, IfcAddress a) : base(db,a) { mPurpose = a.mPurpose; mDescription = a.mDescription; mUserDefinedPurpose = a.mUserDefinedPurpose; }