2 #include <RWStepBasic_RWApprovalPersonOrganization.ixx>
3 #include <StepBasic_PersonOrganizationSelect.hxx>
4 #include <StepBasic_Approval.hxx>
5 #include <StepBasic_ApprovalRole.hxx>
8 #include <Interface_EntityIterator.hxx>
11 #include <StepBasic_ApprovalPersonOrganization.hxx>
14 RWStepBasic_RWApprovalPersonOrganization::RWStepBasic_RWApprovalPersonOrganization () {}
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
24 // --- Number of Parameter Control ---
26 if (!data->CheckNbParams(num,3,ach,"approval_person_organization")) return;
28 // --- own field : personOrganization ---
30 StepBasic_PersonOrganizationSelect aPersonOrganization;
31 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
32 data->ReadEntity(num,1,"person_organization",ach,aPersonOrganization);
34 // --- own field : authorizedApproval ---
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);
40 // --- own field : role ---
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);
46 //--- Initialisation of the read entity ---
49 ent->Init(aPersonOrganization, aAuthorizedApproval, aRole);
53 void RWStepBasic_RWApprovalPersonOrganization::WriteStep
54 (StepData_StepWriter& SW,
55 const Handle(StepBasic_ApprovalPersonOrganization)& ent) const
58 // --- own field : personOrganization ---
60 SW.Send(ent->PersonOrganization().Value());
62 // --- own field : authorizedApproval ---
64 SW.Send(ent->AuthorizedApproval());
66 // --- own field : role ---
72 void RWStepBasic_RWApprovalPersonOrganization::Share(const Handle(StepBasic_ApprovalPersonOrganization)& ent, Interface_EntityIterator& iter) const
75 iter.GetOneItem(ent->PersonOrganization().Value());
78 iter.GetOneItem(ent->AuthorizedApproval());
81 iter.GetOneItem(ent->Role());