Integration of OCCT 6.5.0 from SVN
[occt.git] / src / RWStepBasic / RWStepBasic_RWApprovalPersonOrganization.cxx
1
2 #include <RWStepBasic_RWApprovalPersonOrganization.ixx>
3 #include <StepBasic_PersonOrganizationSelect.hxx>
4 #include <StepBasic_Approval.hxx>
5 #include <StepBasic_ApprovalRole.hxx>
6
7
8 #include <Interface_EntityIterator.hxx>
9
10
11 #include <StepBasic_ApprovalPersonOrganization.hxx>
12
13
14 RWStepBasic_RWApprovalPersonOrganization::RWStepBasic_RWApprovalPersonOrganization () {}
15
16 void RWStepBasic_RWApprovalPersonOrganization::ReadStep
17         (const Handle(StepData_StepReaderData)& data,
18          const Standard_Integer num,
19          Handle(Interface_Check)& ach,
20          const Handle(StepBasic_ApprovalPersonOrganization)& ent) const
21 {
22
23
24         // --- Number of Parameter Control ---
25
26         if (!data->CheckNbParams(num,3,ach,"approval_person_organization")) return;
27
28         // --- own field : personOrganization ---
29
30         StepBasic_PersonOrganizationSelect aPersonOrganization;
31         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
32         data->ReadEntity(num,1,"person_organization",ach,aPersonOrganization);
33
34         // --- own field : authorizedApproval ---
35
36         Handle(StepBasic_Approval) aAuthorizedApproval;
37         //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
38         data->ReadEntity(num, 2,"authorized_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAuthorizedApproval);
39
40         // --- own field : role ---
41
42         Handle(StepBasic_ApprovalRole) aRole;
43         //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
44         data->ReadEntity(num, 3,"role", ach, STANDARD_TYPE(StepBasic_ApprovalRole), aRole);
45
46         //--- Initialisation of the read entity ---
47
48
49         ent->Init(aPersonOrganization, aAuthorizedApproval, aRole);
50 }
51
52
53 void RWStepBasic_RWApprovalPersonOrganization::WriteStep
54         (StepData_StepWriter& SW,
55          const Handle(StepBasic_ApprovalPersonOrganization)& ent) const
56 {
57
58         // --- own field : personOrganization ---
59
60         SW.Send(ent->PersonOrganization().Value());
61
62         // --- own field : authorizedApproval ---
63
64         SW.Send(ent->AuthorizedApproval());
65
66         // --- own field : role ---
67
68         SW.Send(ent->Role());
69 }
70
71
72 void RWStepBasic_RWApprovalPersonOrganization::Share(const Handle(StepBasic_ApprovalPersonOrganization)& ent, Interface_EntityIterator& iter) const
73 {
74
75         iter.GetOneItem(ent->PersonOrganization().Value());
76
77
78         iter.GetOneItem(ent->AuthorizedApproval());
79
80
81         iter.GetOneItem(ent->Role());
82 }
83