상속: GeometryGym.Ifc.IfcRelationship
예제 #1
0
 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);
         }
     }
 }
예제 #2
0
 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);
                 }
             }
         }
     }
 }
예제 #3
0
		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);	
		}
예제 #4
0
 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);
                 }
             }
         }
     }
 }
예제 #5
0
 public void Remove(IfcRelAssociates associates)
 {
     mHasAssociations.Remove(associates);
 }
예제 #6
0
 public void Associate(IfcRelAssociates associates)
 {
     mHasAssociations.Add(associates);
 }
예제 #7
0
파일: IFC R.cs 프로젝트: jenca-cloud/ggIFC
		protected static void parseFields(IfcRelAssociates a, List<string> arrFields, ref int ipos) { IfcRelationship.parseFields(a, arrFields, ref ipos); a.mRelatedObjects = ParserSTEP.SplitListLinks(arrFields[ipos++]); }
예제 #8
0
파일: IFC R.cs 프로젝트: jenca-cloud/ggIFC
		protected IfcRelAssociates(IfcRelAssociates i) : base(i) { mRelatedObjects = new List<int>(i.mRelatedObjects.ToArray()); }
예제 #9
0
파일: IFC P.cs 프로젝트: jenca-cloud/ggIFC
		internal virtual void Associate(IfcRelAssociates a) { mHasAssociations.Add(a); }