0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWLengthUnit.cxx
CommitLineData
7fd59977 1
2#include <RWStepBasic_RWLengthUnit.ixx>
3#include <StepBasic_DimensionalExponents.hxx>
4
5
6#include <Interface_EntityIterator.hxx>
7
8
9#include <StepBasic_LengthUnit.hxx>
10
11
12RWStepBasic_RWLengthUnit::RWStepBasic_RWLengthUnit () {}
13
14void RWStepBasic_RWLengthUnit::ReadStep
15 (const Handle(StepData_StepReaderData)& data,
16 const Standard_Integer num,
17 Handle(Interface_Check)& ach,
18 const Handle(StepBasic_LengthUnit)& ent) const
19{
20
21
22 // --- Number of Parameter Control ---
23
24 if (!data->CheckNbParams(num,1,ach,"length_unit")) return;
25
26 // --- inherited field : dimensions ---
27
28 Handle(StepBasic_DimensionalExponents) aDimensions;
29 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
30 data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions);
31
32 //--- Initialisation of the read entity ---
33
34
35 ent->Init(aDimensions);
36}
37
38
39void RWStepBasic_RWLengthUnit::WriteStep
40 (StepData_StepWriter& SW,
41 const Handle(StepBasic_LengthUnit)& ent) const
42{
43
44 // --- inherited field dimensions ---
45
46 SW.Send(ent->Dimensions());
47}
48
49
50void RWStepBasic_RWLengthUnit::Share(const Handle(StepBasic_LengthUnit)& ent, Interface_EntityIterator& iter) const
51{
52
53 iter.GetOneItem(ent->Dimensions());
54}
55