Integration of OCCT 6.5.0 from SVN
[occt.git] / src / RWStepBasic / RWStepBasic_RWApproval.cxx
1
2 #include <RWStepBasic_RWApproval.ixx>
3 #include <StepBasic_ApprovalStatus.hxx>
4
5
6 #include <Interface_EntityIterator.hxx>
7
8
9 #include <StepBasic_Approval.hxx>
10
11
12 RWStepBasic_RWApproval::RWStepBasic_RWApproval () {}
13
14 void RWStepBasic_RWApproval::ReadStep
15         (const Handle(StepData_StepReaderData)& data,
16          const Standard_Integer num,
17          Handle(Interface_Check)& ach,
18          const Handle(StepBasic_Approval)& ent) const
19 {
20
21
22         // --- Number of Parameter Control ---
23
24         if (!data->CheckNbParams(num,2,ach,"approval")) return;
25
26         // --- own field : status ---
27
28         Handle(StepBasic_ApprovalStatus) aStatus;
29         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
30         data->ReadEntity(num, 1,"status", ach, STANDARD_TYPE(StepBasic_ApprovalStatus), aStatus);
31
32         // --- own field : level ---
33
34         Handle(TCollection_HAsciiString) aLevel;
35         //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
36         data->ReadString (num,2,"level",ach,aLevel);
37
38         //--- Initialisation of the read entity ---
39
40
41         ent->Init(aStatus, aLevel);
42 }
43
44
45 void RWStepBasic_RWApproval::WriteStep
46         (StepData_StepWriter& SW,
47          const Handle(StepBasic_Approval)& ent) const
48 {
49
50         // --- own field : status ---
51
52         SW.Send(ent->Status());
53
54         // --- own field : level ---
55
56         SW.Send(ent->Level());
57 }
58
59
60 void RWStepBasic_RWApproval::Share(const Handle(StepBasic_Approval)& ent, Interface_EntityIterator& iter) const
61 {
62
63         iter.GetOneItem(ent->Status());
64 }
65