]>
Commit | Line | Data |
---|---|---|
b311480e | 1 | // Created on: 1999-11-26 |
2 | // Created by: Andrey BETENEV | |
3 | // Copyright (c) 1999 Matra Datavision | |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS | |
5 | // | |
6 | // The content of this file is subject to the Open CASCADE Technology Public | |
7 | // License Version 6.5 (the "License"). You may not use the content of this file | |
8 | // except in compliance with the License. Please obtain a copy of the License | |
9 | // at http://www.opencascade.org and read it completely before using this file. | |
10 | // | |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |
13 | // | |
14 | // The Original Code and all software distributed under the License is | |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the | |
16 | // Initial Developer hereby disclaims all such warranties, including without | |
17 | // limitation, any warranties of merchantability, fitness for a particular | |
18 | // purpose or non-infringement. Please see the License for the specific terms | |
19 | // and conditions governing the rights and limitations under the License. | |
20 | ||
7fd59977 | 21 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
7fd59977 | 22 | |
23 | #include <RWStepAP203_RWStartRequest.ixx> | |
24 | #include <StepAP203_HArray1OfStartRequestItem.hxx> | |
25 | #include <StepAP203_StartRequestItem.hxx> | |
26 | ||
27 | //======================================================================= | |
28 | //function : RWStepAP203_RWStartRequest | |
29 | //purpose : | |
30 | //======================================================================= | |
31 | ||
32 | RWStepAP203_RWStartRequest::RWStepAP203_RWStartRequest () | |
33 | { | |
34 | } | |
35 | ||
36 | //======================================================================= | |
37 | //function : ReadStep | |
38 | //purpose : | |
39 | //======================================================================= | |
40 | ||
41 | void RWStepAP203_RWStartRequest::ReadStep (const Handle(StepData_StepReaderData)& data, | |
42 | const Standard_Integer num, | |
43 | Handle(Interface_Check)& ach, | |
44 | const Handle(StepAP203_StartRequest) &ent) const | |
45 | { | |
46 | // Check number of parameters | |
47 | if ( ! data->CheckNbParams(num,2,ach,"start_request") ) return; | |
48 | ||
49 | // Inherited fields of ActionRequestAssignment | |
50 | ||
51 | Handle(StepBasic_VersionedActionRequest) aActionRequestAssignment_AssignedActionRequest; | |
52 | data->ReadEntity (num, 1, "action_request_assignment.assigned_action_request", ach, STANDARD_TYPE(StepBasic_VersionedActionRequest), aActionRequestAssignment_AssignedActionRequest); | |
53 | ||
54 | // Own fields of StartRequest | |
55 | ||
56 | Handle(StepAP203_HArray1OfStartRequestItem) aItems; | |
57 | Standard_Integer sub2 = 0; | |
58 | if ( data->ReadSubList (num, 2, "items", ach, sub2) ) { | |
59 | Standard_Integer num2 = sub2; | |
60 | Standard_Integer nb0 = data->NbParams(num2); | |
61 | aItems = new StepAP203_HArray1OfStartRequestItem (1, nb0); | |
62 | for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { | |
63 | StepAP203_StartRequestItem anIt0; | |
64 | data->ReadEntity (num2, i0, "items", ach, anIt0); | |
65 | aItems->SetValue(i0, anIt0); | |
66 | } | |
67 | } | |
68 | ||
69 | // Initialize entity | |
70 | ent->Init(aActionRequestAssignment_AssignedActionRequest, | |
71 | aItems); | |
72 | } | |
73 | ||
74 | //======================================================================= | |
75 | //function : WriteStep | |
76 | //purpose : | |
77 | //======================================================================= | |
78 | ||
79 | void RWStepAP203_RWStartRequest::WriteStep (StepData_StepWriter& SW, | |
80 | const Handle(StepAP203_StartRequest) &ent) const | |
81 | { | |
82 | ||
83 | // Inherited fields of ActionRequestAssignment | |
84 | ||
85 | SW.Send (ent->StepBasic_ActionRequestAssignment::AssignedActionRequest()); | |
86 | ||
87 | // Own fields of StartRequest | |
88 | ||
89 | SW.OpenSub(); | |
90 | for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) { | |
91 | StepAP203_StartRequestItem Var0 = ent->Items()->Value(i1); | |
92 | SW.Send (Var0.Value()); | |
93 | } | |
94 | SW.CloseSub(); | |
95 | } | |
96 | ||
97 | //======================================================================= | |
98 | //function : Share | |
99 | //purpose : | |
100 | //======================================================================= | |
101 | ||
102 | void RWStepAP203_RWStartRequest::Share (const Handle(StepAP203_StartRequest) &ent, | |
103 | Interface_EntityIterator& iter) const | |
104 | { | |
105 | ||
106 | // Inherited fields of ActionRequestAssignment | |
107 | ||
108 | iter.AddItem (ent->StepBasic_ActionRequestAssignment::AssignedActionRequest()); | |
109 | ||
110 | // Own fields of StartRequest | |
111 | ||
112 | for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) { | |
113 | StepAP203_StartRequestItem Var0 = ent->Items()->Value(i2); | |
114 | iter.AddItem (Var0.Value()); | |
115 | } | |
116 | } |