示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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;
            }
        }