GeometryGym.Ifc.IfcConstraint.setJSON C# (CSharp) Méthode

setJSON() protected méthode

protected setJSON ( Newtonsoft.Json.Linq.JObject obj, BaseClassIfc host, HashSet processed ) : void
obj Newtonsoft.Json.Linq.JObject
host BaseClassIfc
processed HashSet
Résultat void
		protected override void setJSON(JObject obj, BaseClassIfc host, HashSet<int> processed)
		{
			base.setJSON(obj, host, processed);

			setAttribute(obj, "Name", Name);
			setAttribute(obj, "Description", Description);
			obj["ConstraintGrade"] = mConstraintGrade.ToString();
			setAttribute(obj, "ConstraintSource", ConstraintSource);

			if (mHasExternalReferences.Count > 0)
			{
				JArray array = new JArray();
				foreach (IfcExternalReferenceRelationship r in mHasExternalReferences)
					array.Add(r.getJson(this, processed));
				obj["HasExternalReferences"] = array;
			}
			if (mPropertiesForConstraint.Count > 0)
			{
				JArray array = new JArray();
				foreach (IfcResourceConstraintRelationship r in mPropertiesForConstraint)
					array.Add(r.getJson(this, processed));
				obj["PropertiesForConstraint"] = array;
			}
			if (mHasConstraintRelationships.Count > 0)
			{
				JArray array = new JArray();
				foreach (IfcResourceConstraintRelationship r in mHasConstraintRelationships)
					array.Add(r.getJson(this, processed));
				obj["HasConstraintRelationships"] = array;
			}
			setAttribute(obj, "UserDefinedGrade", UserDefinedGrade);
		}
	}