1 // File: RWStepAP214_RWAppliedGroupAssignment.cxx
2 // Created: Wed May 10 15:09:06 2000
3 // Author: Andrey BETENEV
4 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
5 // Copyright: Matra Datavision 2000
7 #include <RWStepAP214_RWAppliedGroupAssignment.ixx>
8 #include <StepAP214_HArray1OfGroupItem.hxx>
9 #include <StepAP214_GroupItem.hxx>
11 //=======================================================================
12 //function : RWStepAP214_RWAppliedGroupAssignment
14 //=======================================================================
16 RWStepAP214_RWAppliedGroupAssignment::RWStepAP214_RWAppliedGroupAssignment ()
20 //=======================================================================
23 //=======================================================================
25 void RWStepAP214_RWAppliedGroupAssignment::ReadStep (const Handle(StepData_StepReaderData)& data,
26 const Standard_Integer num,
27 Handle(Interface_Check)& ach,
28 const Handle(StepAP214_AppliedGroupAssignment) &ent) const
30 // Check number of parameters
31 if ( ! data->CheckNbParams(num,2,ach,"applied_group_assignment") ) return;
33 // Inherited fields of GroupAssignment
35 Handle(StepBasic_Group) aGroupAssignment_AssignedGroup;
36 data->ReadEntity (num, 1, "group_assignment.assigned_group", ach, STANDARD_TYPE(StepBasic_Group), aGroupAssignment_AssignedGroup);
38 // Own fields of AppliedGroupAssignment
40 Handle(StepAP214_HArray1OfGroupItem) aItems;
41 Standard_Integer sub2 = 0;
42 if ( data->ReadSubList (num, 2, "items", ach, sub2) ) {
43 Standard_Integer num2 = sub2;
44 Standard_Integer nb0 = data->NbParams(num2);
45 aItems = new StepAP214_HArray1OfGroupItem (1, nb0);
46 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
47 StepAP214_GroupItem anIt0;
48 data->ReadEntity (num2, i0, "items", ach, anIt0);
49 aItems->SetValue(i0, anIt0);
54 ent->Init(aGroupAssignment_AssignedGroup,
58 //=======================================================================
59 //function : WriteStep
61 //=======================================================================
63 void RWStepAP214_RWAppliedGroupAssignment::WriteStep (StepData_StepWriter& SW,
64 const Handle(StepAP214_AppliedGroupAssignment) &ent) const
67 // Inherited fields of GroupAssignment
69 SW.Send (ent->StepBasic_GroupAssignment::AssignedGroup());
71 // Own fields of AppliedGroupAssignment
74 for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) {
75 StepAP214_GroupItem Var0 = ent->Items()->Value(i1);
76 SW.Send (Var0.Value());
81 //=======================================================================
84 //=======================================================================
86 void RWStepAP214_RWAppliedGroupAssignment::Share (const Handle(StepAP214_AppliedGroupAssignment) &ent,
87 Interface_EntityIterator& iter) const
90 // Inherited fields of GroupAssignment
92 iter.AddItem (ent->StepBasic_GroupAssignment::AssignedGroup());
94 // Own fields of AppliedGroupAssignment
96 for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) {
97 StepAP214_GroupItem Var0 = ent->Items()->Value(i2);
98 iter.AddItem (Var0.Value());