protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); setAttribute(obj, "Intent", Intent); if (host.mIndex != mRelatingConstraint) { obj["RelatingConstraint"] = RelatingConstraint.getJson(this, options); } }
protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed) { base.setJSON(obj, host, processed); setAttribute(obj, "Intent", Intent); if (host.mIndex != mRelatingConstraint) { obj["RelatingConstraint"] = RelatingConstraint.getJson(this, processed); } }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); if (mRelatingConstraint != host.mIndex) { obj["RelatingConstraint"] = RelatingConstraint.getJson(this, options); } JArray array = new JArray(); foreach (IfcResourceObjectSelect r in RelatedResourceObjects) { IfcResourceConstraintRelationship rcr = r as IfcResourceConstraintRelationship; if (r.Index != host.mIndex) { array.Add(mDatabase[r.Index].getJson(this, options)); } } if (array.Count > 0) { obj["RelatedResourceObjects"] = array; } }