0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepAP203 / RWStepAP203_RWCcDesignCertification.cxx
CommitLineData
7fd59977 1// File: RWStepAP203_RWCcDesignCertification.cxx
2// Created: Fri Nov 26 16:26:31 1999
3// Author: Andrey BETENEV
4// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
5// Copyright: Matra Datavision 1999
6
7#include <RWStepAP203_RWCcDesignCertification.ixx>
8#include <StepAP203_HArray1OfCertifiedItem.hxx>
9#include <StepAP203_CertifiedItem.hxx>
10
11//=======================================================================
12//function : RWStepAP203_RWCcDesignCertification
13//purpose :
14//=======================================================================
15
16RWStepAP203_RWCcDesignCertification::RWStepAP203_RWCcDesignCertification ()
17{
18}
19
20//=======================================================================
21//function : ReadStep
22//purpose :
23//=======================================================================
24
25void RWStepAP203_RWCcDesignCertification::ReadStep (const Handle(StepData_StepReaderData)& data,
26 const Standard_Integer num,
27 Handle(Interface_Check)& ach,
28 const Handle(StepAP203_CcDesignCertification) &ent) const
29{
30 // Check number of parameters
31 if ( ! data->CheckNbParams(num,2,ach,"cc_design_certification") ) return;
32
33 // Inherited fields of CertificationAssignment
34
35 Handle(StepBasic_Certification) aCertificationAssignment_AssignedCertification;
36 data->ReadEntity (num, 1, "certification_assignment.assigned_certification", ach, STANDARD_TYPE(StepBasic_Certification), aCertificationAssignment_AssignedCertification);
37
38 // Own fields of CcDesignCertification
39
40 Handle(StepAP203_HArray1OfCertifiedItem) 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 StepAP203_HArray1OfCertifiedItem (1, nb0);
46 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
47 StepAP203_CertifiedItem anIt0;
48 data->ReadEntity (num2, i0, "items", ach, anIt0);
49 aItems->SetValue(i0, anIt0);
50 }
51 }
52
53 // Initialize entity
54 ent->Init(aCertificationAssignment_AssignedCertification,
55 aItems);
56}
57
58//=======================================================================
59//function : WriteStep
60//purpose :
61//=======================================================================
62
63void RWStepAP203_RWCcDesignCertification::WriteStep (StepData_StepWriter& SW,
64 const Handle(StepAP203_CcDesignCertification) &ent) const
65{
66
67 // Inherited fields of CertificationAssignment
68
69 SW.Send (ent->StepBasic_CertificationAssignment::AssignedCertification());
70
71 // Own fields of CcDesignCertification
72
73 SW.OpenSub();
74 for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) {
75 StepAP203_CertifiedItem Var0 = ent->Items()->Value(i1);
76 SW.Send (Var0.Value());
77 }
78 SW.CloseSub();
79}
80
81//=======================================================================
82//function : Share
83//purpose :
84//=======================================================================
85
86void RWStepAP203_RWCcDesignCertification::Share (const Handle(StepAP203_CcDesignCertification) &ent,
87 Interface_EntityIterator& iter) const
88{
89
90 // Inherited fields of CertificationAssignment
91
92 iter.AddItem (ent->StepBasic_CertificationAssignment::AssignedCertification());
93
94 // Own fields of CcDesignCertification
95
96 for (Standard_Integer i2=1; i2 <= ent->Items()->Length(); i2++ ) {
97 StepAP203_CertifiedItem Var0 = ent->Items()->Value(i2);
98 iter.AddItem (Var0.Value());
99 }
100}