0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWOrdinalDate.cxx
CommitLineData
7fd59977 1
2#include <RWStepBasic_RWOrdinalDate.ixx>
3
4
5RWStepBasic_RWOrdinalDate::RWStepBasic_RWOrdinalDate () {}
6
7void RWStepBasic_RWOrdinalDate::ReadStep
8 (const Handle(StepData_StepReaderData)& data,
9 const Standard_Integer num,
10 Handle(Interface_Check)& ach,
11 const Handle(StepBasic_OrdinalDate)& ent) const
12{
13
14
15 // --- Number of Parameter Control ---
16
17 if (!data->CheckNbParams(num,2,ach,"ordinal_date")) return;
18
19 // --- inherited field : yearComponent ---
20
21 Standard_Integer aYearComponent;
22 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
23 data->ReadInteger (num,1,"year_component",ach,aYearComponent);
24
25 // --- own field : dayComponent ---
26
27 Standard_Integer aDayComponent;
28 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
29 data->ReadInteger (num,2,"day_component",ach,aDayComponent);
30
31 //--- Initialisation of the read entity ---
32
33
34 ent->Init(aYearComponent, aDayComponent);
35}
36
37
38void RWStepBasic_RWOrdinalDate::WriteStep
39 (StepData_StepWriter& SW,
40 const Handle(StepBasic_OrdinalDate)& ent) const
41{
42
43 // --- inherited field yearComponent ---
44
45 SW.Send(ent->YearComponent());
46
47 // --- own field : dayComponent ---
48
49 SW.Send(ent->DayComponent());
50}