0024157: Parallelization of assembly part of BO
[occt.git] / src / RWStepBasic / RWStepBasic_RWApprovalPersonOrganization.cxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
7 //
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10 //
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
17
18
19 #include <RWStepBasic_RWApprovalPersonOrganization.ixx>
20 #include <StepBasic_PersonOrganizationSelect.hxx>
21 #include <StepBasic_Approval.hxx>
22 #include <StepBasic_ApprovalRole.hxx>
23
24
25 #include <Interface_EntityIterator.hxx>
26
27
28 #include <StepBasic_ApprovalPersonOrganization.hxx>
29
30
31 RWStepBasic_RWApprovalPersonOrganization::RWStepBasic_RWApprovalPersonOrganization () {}
32
33 void RWStepBasic_RWApprovalPersonOrganization::ReadStep
34         (const Handle(StepData_StepReaderData)& data,
35          const Standard_Integer num,
36          Handle(Interface_Check)& ach,
37          const Handle(StepBasic_ApprovalPersonOrganization)& ent) const
38 {
39
40
41         // --- Number of Parameter Control ---
42
43         if (!data->CheckNbParams(num,3,ach,"approval_person_organization")) return;
44
45         // --- own field : personOrganization ---
46
47         StepBasic_PersonOrganizationSelect aPersonOrganization;
48         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
49         data->ReadEntity(num,1,"person_organization",ach,aPersonOrganization);
50
51         // --- own field : authorizedApproval ---
52
53         Handle(StepBasic_Approval) aAuthorizedApproval;
54         //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
55         data->ReadEntity(num, 2,"authorized_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAuthorizedApproval);
56
57         // --- own field : role ---
58
59         Handle(StepBasic_ApprovalRole) aRole;
60         //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
61         data->ReadEntity(num, 3,"role", ach, STANDARD_TYPE(StepBasic_ApprovalRole), aRole);
62
63         //--- Initialisation of the read entity ---
64
65
66         ent->Init(aPersonOrganization, aAuthorizedApproval, aRole);
67 }
68
69
70 void RWStepBasic_RWApprovalPersonOrganization::WriteStep
71         (StepData_StepWriter& SW,
72          const Handle(StepBasic_ApprovalPersonOrganization)& ent) const
73 {
74
75         // --- own field : personOrganization ---
76
77         SW.Send(ent->PersonOrganization().Value());
78
79         // --- own field : authorizedApproval ---
80
81         SW.Send(ent->AuthorizedApproval());
82
83         // --- own field : role ---
84
85         SW.Send(ent->Role());
86 }
87
88
89 void RWStepBasic_RWApprovalPersonOrganization::Share(const Handle(StepBasic_ApprovalPersonOrganization)& ent, Interface_EntityIterator& iter) const
90 {
91
92         iter.GetOneItem(ent->PersonOrganization().Value());
93
94
95         iter.GetOneItem(ent->AuthorizedApproval());
96
97
98         iter.GetOneItem(ent->Role());
99 }
100