0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepDimTol / RWStepDimTol_RWPlacedDatumTargetFeature.cxx
1 // File:        RWStepDimTol_RWPlacedDatumTargetFeature.cxx
2 // Created:     Wed Jun  4 13:34:33 2003 
3 // Author:      Galina KULIKOVA
4 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
5 // Copyright:   Open CASCADE 2002
6
7 #include <RWStepDimTol_RWPlacedDatumTargetFeature.ixx>
8
9 //=======================================================================
10 //function : RWStepDimTol_RWPlacedDatumTargetFeature
11 //purpose  : 
12 //=======================================================================
13
14 RWStepDimTol_RWPlacedDatumTargetFeature::RWStepDimTol_RWPlacedDatumTargetFeature ()
15 {
16 }
17
18 //=======================================================================
19 //function : ReadStep
20 //purpose  : 
21 //=======================================================================
22
23 void RWStepDimTol_RWPlacedDatumTargetFeature::ReadStep (const Handle(StepData_StepReaderData)& data,
24                                                         const Standard_Integer num,
25                                                         Handle(Interface_Check)& ach,
26                                                         const Handle(StepDimTol_PlacedDatumTargetFeature) &ent) const
27 {
28   // Check number of parameters
29   if ( ! data->CheckNbParams(num,5,ach,"placed_datum_target_feature") ) return;
30
31   // Inherited fields of ShapeAspect
32
33   Handle(TCollection_HAsciiString) aShapeAspect_Name;
34   data->ReadString (num, 1, "shape_aspect.name", ach, aShapeAspect_Name);
35
36   Handle(TCollection_HAsciiString) aShapeAspect_Description;
37   if ( data->IsParamDefined (num,2) ) {
38     data->ReadString (num, 2, "shape_aspect.description", ach, aShapeAspect_Description);
39   }
40
41   Handle(StepRepr_ProductDefinitionShape) aShapeAspect_OfShape;
42   data->ReadEntity (num, 3, "shape_aspect.of_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aShapeAspect_OfShape);
43
44   StepData_Logical aShapeAspect_ProductDefinitional;
45   data->ReadLogical (num, 4, "shape_aspect.product_definitional", ach, aShapeAspect_ProductDefinitional);
46
47   // Inherited fields of DatumTarget
48
49   Handle(TCollection_HAsciiString) aDatumTarget_TargetId;
50   data->ReadString (num, 5, "datum_target.target_id", ach, aDatumTarget_TargetId);
51
52   // Initialize entity
53   ent->Init(aShapeAspect_Name,
54             aShapeAspect_Description,
55             aShapeAspect_OfShape,
56             aShapeAspect_ProductDefinitional,
57             aDatumTarget_TargetId);
58 }
59
60 //=======================================================================
61 //function : WriteStep
62 //purpose  : 
63 //=======================================================================
64
65 void RWStepDimTol_RWPlacedDatumTargetFeature::WriteStep (StepData_StepWriter& SW,
66                                                          const Handle(StepDimTol_PlacedDatumTargetFeature) &ent) const
67 {
68
69   // Inherited fields of ShapeAspect
70
71   SW.Send (ent->StepRepr_ShapeAspect::Name());
72
73   SW.Send (ent->StepRepr_ShapeAspect::Description());
74
75   SW.Send (ent->StepRepr_ShapeAspect::OfShape());
76
77   SW.SendLogical (ent->StepRepr_ShapeAspect::ProductDefinitional());
78
79   // Inherited fields of DatumTarget
80
81   SW.Send (ent->StepDimTol_DatumTarget::TargetId());
82 }
83
84 //=======================================================================
85 //function : Share
86 //purpose  : 
87 //=======================================================================
88
89 void RWStepDimTol_RWPlacedDatumTargetFeature::Share (const Handle(StepDimTol_PlacedDatumTargetFeature) &ent,
90                                                      Interface_EntityIterator& iter) const
91 {
92
93   // Inherited fields of ShapeAspect
94
95   iter.AddItem (ent->StepRepr_ShapeAspect::OfShape());
96
97   // Inherited fields of DatumTarget
98 }