GeometryGym.Ifc.IfcAppliedValue.setJSON C# (CSharp) Méthode

setJSON() protected méthode

protected setJSON ( JObject obj, BaseClassIfc host, HashSet processed ) : void
obj JObject
host BaseClassIfc
processed HashSet
Résultat void
        protected override void setJSON(JObject obj, BaseClassIfc host,  HashSet<int> processed)
        {
            base.setJSON(obj, host, processed);
            setAttribute(obj, "Name", Name);
            setAttribute(obj, "Description", Description);
            if (mAppliedValueIndex > 0)
                obj["AppliedValue"] = mDatabase[mAppliedValueIndex].getJson(this, processed);
            else if (mAppliedValueValue != null)
                obj["AppliedValue"] = DatabaseIfc.extract(mAppliedValueValue);
            if (mUnitBasis > 0)
                obj["UnitBasis"] = UnitBasis.getJson(this, processed);
            //todo
            setAttribute(obj, "Category", Category);
            setAttribute(obj, "Condition", Condition);
            if (mArithmeticOperator != IfcArithmeticOperatorEnum.NONE)
                obj["ArithmeticOperator"] = ArithmeticOperator.ToString();
            if(mComponents.Count > 0)
                obj["Components"] = new JArray(Components.ConvertAll(x => x.getJson(this, processed)));
            if (mHasExternalReferences.Count > 0)
                obj["HasExternalReferences"] = new JArray(HasExternalReferences.ConvertAll(x => x.getJson(this, processed)));
            if (mHasConstraintRelationships.Count > 0)
            {
                JArray array = new JArray();
                foreach (IfcResourceConstraintRelationship r in HasConstraintRelationships)
                {
                    if (r.mIndex != host.mIndex)
                        array.Add(r.getJson(this, processed));
                }
                if(array.Count > 0)
                    obj["HasConstraintRelationships"] = array;
            }
        }