Inheritance: GeometryGym.Ifc.IfcRelationship
コード例 #1
0
ファイル: IFC O.cs プロジェクト: jddaigle/GeometryGymIFC
 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
ファイル: IFC O.cs プロジェクト: jddaigle/GeometryGymIFC
 public void Remove(IfcRelAssociates associates)
 {
     mHasAssociations.Remove(associates);
 }
コード例 #6
0
ファイル: IFC O.cs プロジェクト: jddaigle/GeometryGymIFC
 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); }