b311480e |
1 | // Created on: 1999-11-26 |
2 | // Created by: Andrey BETENEV |
3 | // Copyright (c) 1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
973c2be1 |
8 | // This library is free software; you can redistribute it and / or modify it |
9 | // under the terms of the GNU Lesser General Public version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
7fd59977 |
18 | |
19 | #include <RWStepAP203_RWStartRequest.ixx> |
20 | #include <StepAP203_HArray1OfStartRequestItem.hxx> |
21 | #include <StepAP203_StartRequestItem.hxx> |
22 | |
23 | //======================================================================= |
24 | //function : RWStepAP203_RWStartRequest |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | RWStepAP203_RWStartRequest::RWStepAP203_RWStartRequest () |
29 | { |
30 | } |
31 | |
32 | //======================================================================= |
33 | //function : ReadStep |
34 | //purpose : |
35 | //======================================================================= |
36 | |
37 | void RWStepAP203_RWStartRequest::ReadStep (const Handle(StepData_StepReaderData)& data, |
38 | const Standard_Integer num, |
39 | Handle(Interface_Check)& ach, |
40 | const Handle(StepAP203_StartRequest) &ent) const |
41 | { |
42 | // Check number of parameters |
43 | if ( ! data->CheckNbParams(num,2,ach,"start_request") ) return; |
44 | |
45 | // Inherited fields of ActionRequestAssignment |
46 | |
47 | Handle(StepBasic_VersionedActionRequest) aActionRequestAssignment_AssignedActionRequest; |
48 | data->ReadEntity (num, 1, "action_request_assignment.assigned_action_request", ach, STANDARD_TYPE(StepBasic_VersionedActionRequest), aActionRequestAssignment_AssignedActionRequest); |
49 | |
50 | // Own fields of StartRequest |
51 | |
52 | Handle(StepAP203_HArray1OfStartRequestItem) aItems; |
53 | Standard_Integer sub2 = 0; |
54 | if ( data->ReadSubList (num, 2, "items", ach, sub2) ) { |
55 | Standard_Integer num2 = sub2; |
56 | Standard_Integer nb0 = data->NbParams(num2); |
57 | aItems = new StepAP203_HArray1OfStartRequestItem (1, nb0); |
58 | for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { |
59 | StepAP203_StartRequestItem anIt0; |
60 | data->ReadEntity (num2, i0, "items", ach, anIt0); |
61 | aItems->SetValue(i0, anIt0); |
62 | } |
63 | } |
64 | |
65 | // Initialize entity |
66 | ent->Init(aActionRequestAssignment_AssignedActionRequest, |
67 | aItems); |
68 | } |
69 | |
70 | //======================================================================= |
71 | //function : WriteStep |
72 | //purpose : |
73 | //======================================================================= |
74 | |
75 | void RWStepAP203_RWStartRequest::WriteStep (StepData_StepWriter& SW, |
76 | const Handle(StepAP203_StartRequest) &ent) const |
77 | { |
78 | |
79 | // Inherited fields of ActionRequestAssignment |
80 | |
81 | SW.Send (ent->StepBasic_ActionRequestAssignment::AssignedActionRequest()); |
82 | |
83 | // Own fields of StartRequest |
84 | |
85 | SW.OpenSub(); |
86 | for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) { |
87 | StepAP203_StartRequestItem Var0 = ent->Items()->Value(i1); |
88 | SW.Send (Var0.Value()); |
89 | } |
90 | SW.CloseSub(); |
91 | } |
92 | |
93 | //======================================================================= |
94 | //function : Share |
95 | //purpose : |
96 | //======================================================================= |
97 | |
98 | void RWStepAP203_RWStartRequest::Share (const Handle(StepAP203_StartRequest) &ent, |
99 | Interface_EntityIterator& iter) const |
100 | { |
101 | |
102 | // Inherited fields of ActionRequestAssignment |
103 | |
104 | iter.AddItem (ent->StepBasic_ActionRequestAssignment::AssignedActionRequest()); |
105 | |
106 | // Own fields of StartRequest |
107 | |
108 | for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) { |
109 | StepAP203_StartRequestItem Var0 = ent->Items()->Value(i2); |
110 | iter.AddItem (Var0.Value()); |
111 | } |
112 | } |