protected IfcObjectDefinition(DatabaseIfc db, IfcObjectDefinition o, bool downStream) : base(db, o) { foreach (IfcRelAssigns assigns in o.mHasAssignments) { IfcRelAssigns dup = db.Factory.Duplicate(assigns, false) as IfcRelAssigns; dup.AddRelated(this); } if (o.mDecomposes != null) { (db.Factory.Duplicate(o.mDecomposes, false) as IfcRelAggregates).addObject(this); } foreach (IfcRelAssociates associates in o.mHasAssociations) { IfcRelAssociates dup = db.Factory.Duplicate(associates) as IfcRelAssociates; dup.addRelated(this); } if (mHasContext != null) { (db.Factory.Duplicate(mHasContext, false) as IfcRelDeclares).AddRelated(this); } if (downStream) { foreach (IfcRelAggregates rag in o.mIsDecomposedBy) { mDatabase.Factory.Duplicate(rag, true); } foreach (IfcRelNests rn in o.mIsNestedBy) { mDatabase.Factory.Duplicate(rn, true); } } }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "HasAssignments") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelAssigns ra = mDatabase.ParseXml <IfcRelAssigns>(node as XmlElement); if (ra != null) { ra.AddRelated(this); } } } else if (string.Compare(name, "IsNestedBy") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelNests rn = mDatabase.ParseXml <IfcRelNests>(node as XmlElement); if (rn != null) { rn.RelatingObject = this; } } } else if (string.Compare(name, "IsDecomposedBy") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelAggregates ra = mDatabase.ParseXml <IfcRelAggregates>(node as XmlElement); if (ra != null) { ra.RelatingObject = this; } } } else if (string.Compare(name, "HasAssociations") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelAssociates ra = mDatabase.ParseXml <IfcRelAssociates>(node as XmlElement); if (ra != null) { ra.addAssociation(this); } } } } }
protected IfcObjectDefinition(DatabaseIfc db, IfcObjectDefinition o) : base (db, o)//, bool downStream) : base(db, o) { foreach(IfcRelAssigns assigns in o.mHasAssignments) { IfcRelAssigns dup = db.Factory.Duplicate(assigns) as IfcRelAssigns; dup.AddRelated(this); } if (o.mDecomposes != null) (db.Factory.Duplicate(o.mDecomposes, false) as IfcRelAggregates).addObject(this); foreach (IfcRelAssociates associates in o.mHasAssociations) { IfcRelAssociates dup = db.Factory.Duplicate(associates) as IfcRelAssociates; dup.addAssociation(this); } if (mHasContext != null) (db.Factory.Duplicate(mHasContext, false) as IfcRelDeclares).AddRelated(this); }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "HasAssociations") == 0) { foreach (XmlNode node in child.ChildNodes) { IfcRelAssociates ra = mDatabase.ParseXml <IfcRelAssociates>(node as XmlElement); if (ra != null) { HasAssociations.Add(ra); } } } } }
public void Remove(IfcRelAssociates associates) { mHasAssociations.Remove(associates); }
public void Associate(IfcRelAssociates associates) { mHasAssociations.Add(associates); }
protected static void parseFields(IfcRelAssociates a, List<string> arrFields, ref int ipos) { IfcRelationship.parseFields(a, arrFields, ref ipos); a.mRelatedObjects = ParserSTEP.SplitListLinks(arrFields[ipos++]); }
protected IfcRelAssociates(IfcRelAssociates i) : base(i) { mRelatedObjects = new List<int>(i.mRelatedObjects.ToArray()); }
internal virtual void Associate(IfcRelAssociates a) { mHasAssociations.Add(a); }