示例#1
0
        protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
        {
            IfcObjectPlacement placement    = ObjectPlacement;
            JObject            placementObj = null;

            if (placement != null)
            {
                if (string.IsNullOrEmpty(placement.mGlobalId))
                {
                    placement.setGlobalId(ParserIfc.EncodeGuid(Guid.NewGuid()));
                }
                placementObj = placement.getJson(this, options);
            }
            base.setJSON(obj, host, options);

            if (placementObj != null)
            {
                obj["ObjectPlacement"] = placementObj;
            }
            if (options.Style != SetJsonOptions.JsonStyle.Repository)
            {
                IfcProductDefinitionShape representation = Representation;
                if (representation != null)
                {
                    obj["Representation"] = representation.getJson(this, options);
                }
            }
            //internal List<IfcRelAssignsToProduct> mReferencedBy = new List<IfcRelAssignsToProduct>();//	 :	SET OF IfcRelAssignsToProduct FOR RelatingProduct;
        }