0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWProductDefinitionEffectivity.cxx
1
2 #include <RWStepBasic_RWProductDefinitionEffectivity.ixx>
3
4 #include <Interface_EntityIterator.hxx>
5
6
7 #include <StepBasic_ProductDefinitionEffectivity.hxx>
8 #include <StepBasic_ProductDefinitionRelationship.hxx>
9 #include <TCollection_HAsciiString.hxx>
10
11
12 RWStepBasic_RWProductDefinitionEffectivity::RWStepBasic_RWProductDefinitionEffectivity () {}
13
14 void RWStepBasic_RWProductDefinitionEffectivity::ReadStep
15         (const Handle(StepData_StepReaderData)& data,
16          const Standard_Integer num,
17          Handle(Interface_Check)& ach,
18          const Handle(StepBasic_ProductDefinitionEffectivity)& ent) const
19 {
20
21
22         // --- Number of Parameter Control ---
23
24         if (!data->CheckNbParams(num,2,ach,"product_definition_effectivity")) return;
25
26         // --- inherited field : product_data_type ---
27
28         Handle(TCollection_HAsciiString) aId;
29         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
30         data->ReadString (num,1,"id",ach,aId);
31
32         // --- own field : kind ---
33
34         Handle(StepBasic_ProductDefinitionRelationship) aUsage;
35         //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
36         data->ReadEntity (num, 2,"kind", ach, STANDARD_TYPE(StepBasic_ProductDefinitionRelationship), aUsage);
37
38         //--- Initialisation of the read entity ---
39
40
41         ent->Init(aId,aUsage);
42 }
43
44
45 void RWStepBasic_RWProductDefinitionEffectivity::WriteStep
46         (StepData_StepWriter& SW,
47          const Handle(StepBasic_ProductDefinitionEffectivity)& ent) const
48 {
49
50         // --- own field : id ---
51
52         SW.Send(ent->Id());
53         SW.Send(ent->Usage());
54 }
55
56
57 void RWStepBasic_RWProductDefinitionEffectivity::Share(const Handle(StepBasic_ProductDefinitionEffectivity)& ent, Interface_EntityIterator& iter) const
58 {
59   iter.AddItem(ent->Usage());
60 }