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); } }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); parameters.Add(RelatingConstraint != null ? RelatingConstraint.ToStepValue() : "$"); parameters.Add(RelatedResourceObjects != null ? RelatedResourceObjects.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); if (mRelatingConstraint != host.mIndex) { xml.AppendChild(RelatingConstraint.GetXML(xml.OwnerDocument, "RelatingConstraint", this, processed)); } XmlElement element = xml.OwnerDocument.CreateElement("RelatedResourceObjects"); foreach (int r in mRelatedResourceObjects) { if (r != host.mIndex) { element.AppendChild(mDatabase[r].GetXML(xml.OwnerDocument, "", this, processed)); } } if (element.HasChildNodes) { xml.AppendChild(element); } }
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; } }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); setAttribute(xml, "Intent", Intent); xml.AppendChild(RelatingConstraint.GetXML(xml.OwnerDocument, "RelatingConstraint", this, processed)); }