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
7 #include <RWStepDimTol_RWPlacedDatumTargetFeature.ixx>
9 //=======================================================================
10 //function : RWStepDimTol_RWPlacedDatumTargetFeature
12 //=======================================================================
14 RWStepDimTol_RWPlacedDatumTargetFeature::RWStepDimTol_RWPlacedDatumTargetFeature ()
18 //=======================================================================
21 //=======================================================================
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
28 // Check number of parameters
29 if ( ! data->CheckNbParams(num,5,ach,"placed_datum_target_feature") ) return;
31 // Inherited fields of ShapeAspect
33 Handle(TCollection_HAsciiString) aShapeAspect_Name;
34 data->ReadString (num, 1, "shape_aspect.name", ach, aShapeAspect_Name);
36 Handle(TCollection_HAsciiString) aShapeAspect_Description;
37 if ( data->IsParamDefined (num,2) ) {
38 data->ReadString (num, 2, "shape_aspect.description", ach, aShapeAspect_Description);
41 Handle(StepRepr_ProductDefinitionShape) aShapeAspect_OfShape;
42 data->ReadEntity (num, 3, "shape_aspect.of_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aShapeAspect_OfShape);
44 StepData_Logical aShapeAspect_ProductDefinitional;
45 data->ReadLogical (num, 4, "shape_aspect.product_definitional", ach, aShapeAspect_ProductDefinitional);
47 // Inherited fields of DatumTarget
49 Handle(TCollection_HAsciiString) aDatumTarget_TargetId;
50 data->ReadString (num, 5, "datum_target.target_id", ach, aDatumTarget_TargetId);
53 ent->Init(aShapeAspect_Name,
54 aShapeAspect_Description,
56 aShapeAspect_ProductDefinitional,
57 aDatumTarget_TargetId);
60 //=======================================================================
61 //function : WriteStep
63 //=======================================================================
65 void RWStepDimTol_RWPlacedDatumTargetFeature::WriteStep (StepData_StepWriter& SW,
66 const Handle(StepDimTol_PlacedDatumTargetFeature) &ent) const
69 // Inherited fields of ShapeAspect
71 SW.Send (ent->StepRepr_ShapeAspect::Name());
73 SW.Send (ent->StepRepr_ShapeAspect::Description());
75 SW.Send (ent->StepRepr_ShapeAspect::OfShape());
77 SW.SendLogical (ent->StepRepr_ShapeAspect::ProductDefinitional());
79 // Inherited fields of DatumTarget
81 SW.Send (ent->StepDimTol_DatumTarget::TargetId());
84 //=======================================================================
87 //=======================================================================
89 void RWStepDimTol_RWPlacedDatumTargetFeature::Share (const Handle(StepDimTol_PlacedDatumTargetFeature) &ent,
90 Interface_EntityIterator& iter) const
93 // Inherited fields of ShapeAspect
95 iter.AddItem (ent->StepRepr_ShapeAspect::OfShape());
97 // Inherited fields of DatumTarget