protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); IfcDimensionalExponents exponents = Dimensions; if (exponents != null) { obj["Dimensions"] = exponents.getJson(this, options); } obj["UnitType"] = mUnitType.ToString(); }
protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed) { base.setJSON(obj, host, processed); IfcDimensionalExponents exponents = Dimensions; if (exponents != null) { obj["Dimensions"] = exponents.getJson(this, processed); } obj["UnitType"] = mUnitType.ToString(); }
protected IfcNamedUnit(DatabaseIfc m, IfcUnitEnum unitEnum, bool gendims) : base(m) { mUnitType = unitEnum; if (gendims) { if (unitEnum == IfcUnitEnum.LENGTHUNIT) mDimensions = new IfcDimensionalExponents(m, 1, 0, 0, 0, 0, 0, 0).mIndex; else if (unitEnum == IfcUnitEnum.AREAUNIT) mDimensions = new IfcDimensionalExponents(m, 2, 0, 0, 0, 0, 0, 0).mIndex; else if (unitEnum == IfcUnitEnum.VOLUMEUNIT) mDimensions = new IfcDimensionalExponents(m, 3, 0, 0, 0, 0, 0, 0).mIndex; else if (unitEnum == IfcUnitEnum.PLANEANGLEUNIT) mDimensions = new IfcDimensionalExponents(m, 0, 0, 0, 0, 0, 0, 0).mIndex; } }
protected IfcNamedUnit(DatabaseIfc db, IfcUnitEnum unitEnum, bool gendims) : base(db) { mUnitType = unitEnum; if (gendims) { if (unitEnum == IfcUnitEnum.LENGTHUNIT) { Dimensions = new IfcDimensionalExponents(db, 1, 0, 0, 0, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.AREAUNIT) { Dimensions = new IfcDimensionalExponents(db, 2, 0, 0, 0, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.VOLUMEUNIT) { Dimensions = new IfcDimensionalExponents(db, 3, 0, 0, 0, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.MASSUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 1, 0, 0, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.TIMEUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 1, 0, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.ELECTRICCURRENTUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 1, 0, 0, 0); } else if (unitEnum == IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 1, 0, 0); } else if (unitEnum == IfcUnitEnum.AMOUNTOFSUBSTANCEUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 1, 0); } else if (unitEnum == IfcUnitEnum.LUMINOUSINTENSITYUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 0, 1); } else if (unitEnum == IfcUnitEnum.PLANEANGLEUNIT) { Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 0, 0); } } }
internal static IfcDimensionalExponents Parse(string strDef) { IfcDimensionalExponents e = new IfcDimensionalExponents(); int ipos = 0; parseFields(e, ParserSTEP.SplitLineFields(strDef), ref ipos); return e; }
internal static void parseFields(IfcDimensionalExponents e, List<string> arrFields, ref int ipos) { e.mLengthExponent = int.Parse(arrFields[ipos++]); e.mMassExponent = int.Parse(arrFields[ipos++]); e.mTimeExponent = int.Parse(arrFields[ipos++]); e.mElectricCurrentExponent = int.Parse(arrFields[ipos++]); e.mThermodynamicTemperatureExponent = int.Parse(arrFields[ipos++]); e.mAmountOfSubstanceExponent = int.Parse(arrFields[ipos++]); e.mLuminousIntensityExponent = int.Parse(arrFields[ipos++]); }
internal IfcDimensionalExponents(IfcDimensionalExponents e) : base() { mLengthExponent = e.mLengthExponent; mMassExponent = e.mMassExponent; mTimeExponent = e.mTimeExponent; mElectricCurrentExponent = e.mElectricCurrentExponent; mThermodynamicTemperatureExponent = e.mThermodynamicTemperatureExponent; mAmountOfSubstanceExponent = e.mAmountOfSubstanceExponent; mLuminousIntensityExponent = e.mLuminousIntensityExponent; }
public IfcNamedUnit(IfcDimensionalExponents dimensions, IfcUnitEnum unitType) : base(dimensions.Database) { Dimensions = dimensions; UnitType = unitType; }