override protected void Process(IFCAnyHandle item)
        {
            base.Process(item);

            IList <IFCAnyHandle> layerStyles = IFCAnyHandleUtil.GetAggregateInstanceAttribute <List <IFCAnyHandle> >(item, "LayerStyles");

            foreach (IFCAnyHandle layerStyle in layerStyles)
            {
                if (layerStyle == null)
                {
                    Importer.TheLog.LogNullError(IFCEntityType.IfcPresentationStyle);
                    continue;
                }

                IFCPresentationStyle presentationStyle = IFCPresentationStyle.ProcessIFCPresentationStyle(layerStyle);
                if (presentationStyle != null)
                {
                    LayerStyles.Add(presentationStyle);
                }
                else
                {
                    Importer.TheLog.LogUnhandledSubTypeError(layerStyle, "IfcPresentationStyle", false);
                }
            }
        }
예제 #2
0
 protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
 {
     base.setJSON(obj, host, options);
     obj["LayerOn"]      = mLayerOn.ToString();
     obj["LayeyFrozen"]  = mLayerFrozen.ToString();
     obj["LayerBlocked"] = mLayerBlocked.ToString();
     if (mLayerStyles.Count > 0)
     {
         obj["LayerStyles"] = new JArray(LayerStyles.ToList().ConvertAll(x => x.getJson(this, options)));
     }
 }
예제 #3
0
 protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed)
 {
     base.setJSON(obj, host, processed);
     obj["LayerOn"]      = mLayerOn.ToString();
     obj["LayeyFrozen"]  = mLayerFrozen.ToString();
     obj["LayerBlocked"] = mLayerBlocked.ToString();
     if (mLayerStyles.Count > 0)
     {
         obj["LayerStyles"] = new JArray(LayerStyles.ConvertAll(x => x.getJson(this, processed)));
     }
 }
예제 #4
0
        internal override void parseJObject(JObject obj)
        {
            base.parseJObject(obj);
            JToken token = obj.GetValue("LayerOn", StringComparison.InvariantCultureIgnoreCase);

            if (token != null)
            {
                Enum.TryParse <IfcLogicalEnum>(token.Value <string>(), true, out mLayerOn);
            }
            token = obj.GetValue("LayerFrozen", StringComparison.InvariantCultureIgnoreCase);
            if (token != null)
            {
                Enum.TryParse <IfcLogicalEnum>(token.Value <string>(), true, out mLayerFrozen);
            }
            token = obj.GetValue("LayerBlocked", StringComparison.InvariantCultureIgnoreCase);
            if (token != null)
            {
                Enum.TryParse <IfcLogicalEnum>(token.Value <string>(), true, out mLayerBlocked);
            }
            LayerStyles.AddRange(mDatabase.extractJArray <IfcPresentationStyle>(obj.GetValue("LayerStyles", StringComparison.InvariantCultureIgnoreCase) as JArray));
        }