1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Interface_Check.hxx>
16 #include <RWStepBasic_RWDimensionalExponents.hxx>
17 #include <StepBasic_DimensionalExponents.hxx>
18 #include <StepData_StepReaderData.hxx>
19 #include <StepData_StepWriter.hxx>
21 RWStepBasic_RWDimensionalExponents::RWStepBasic_RWDimensionalExponents () {}
23 void RWStepBasic_RWDimensionalExponents::ReadStep
24 (const Handle(StepData_StepReaderData)& data,
25 const Standard_Integer num,
26 Handle(Interface_Check)& ach,
27 const Handle(StepBasic_DimensionalExponents)& ent) const
31 // --- Number of Parameter Control ---
33 if (!data->CheckNbParams(num,7,ach,"dimensional_exponents")) return;
35 // --- own field : lengthExponent ---
37 Standard_Real aLengthExponent;
38 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
39 data->ReadReal (num,1,"length_exponent",ach,aLengthExponent);
41 // --- own field : massExponent ---
43 Standard_Real aMassExponent;
44 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
45 data->ReadReal (num,2,"mass_exponent",ach,aMassExponent);
47 // --- own field : timeExponent ---
49 Standard_Real aTimeExponent;
50 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
51 data->ReadReal (num,3,"time_exponent",ach,aTimeExponent);
53 // --- own field : electricCurrentExponent ---
55 Standard_Real aElectricCurrentExponent;
56 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
57 data->ReadReal (num,4,"electric_current_exponent",ach,aElectricCurrentExponent);
59 // --- own field : thermodynamicTemperatureExponent ---
61 Standard_Real aThermodynamicTemperatureExponent;
62 //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
63 data->ReadReal (num,5,"thermodynamic_temperature_exponent",ach,aThermodynamicTemperatureExponent);
65 // --- own field : amountOfSubstanceExponent ---
67 Standard_Real aAmountOfSubstanceExponent;
68 //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
69 data->ReadReal (num,6,"amount_of_substance_exponent",ach,aAmountOfSubstanceExponent);
71 // --- own field : luminousIntensityExponent ---
73 Standard_Real aLuminousIntensityExponent;
74 //szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
75 data->ReadReal (num,7,"luminous_intensity_exponent",ach,aLuminousIntensityExponent);
77 //--- Initialisation of the read entity ---
80 ent->Init(aLengthExponent, aMassExponent, aTimeExponent, aElectricCurrentExponent, aThermodynamicTemperatureExponent, aAmountOfSubstanceExponent, aLuminousIntensityExponent);
84 void RWStepBasic_RWDimensionalExponents::WriteStep
85 (StepData_StepWriter& SW,
86 const Handle(StepBasic_DimensionalExponents)& ent) const
89 // --- own field : lengthExponent ---
91 SW.Send(ent->LengthExponent());
93 // --- own field : massExponent ---
95 SW.Send(ent->MassExponent());
97 // --- own field : timeExponent ---
99 SW.Send(ent->TimeExponent());
101 // --- own field : electricCurrentExponent ---
103 SW.Send(ent->ElectricCurrentExponent());
105 // --- own field : thermodynamicTemperatureExponent ---
107 SW.Send(ent->ThermodynamicTemperatureExponent());
109 // --- own field : amountOfSubstanceExponent ---
111 SW.Send(ent->AmountOfSubstanceExponent());
113 // --- own field : luminousIntensityExponent ---
115 SW.Send(ent->LuminousIntensityExponent());