1 // Created on: 2000-04-18
2 // Created by: Andrey BETENEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
18 #include <RWStepShape_RWDimensionalLocationWithPath.ixx>
19 #include <StepRepr_ShapeAspect.hxx>
21 //=======================================================================
22 //function : RWStepShape_RWDimensionalLocationWithPath
24 //=======================================================================
26 RWStepShape_RWDimensionalLocationWithPath::RWStepShape_RWDimensionalLocationWithPath ()
30 //=======================================================================
33 //=======================================================================
35 void RWStepShape_RWDimensionalLocationWithPath::ReadStep (const Handle(StepData_StepReaderData)& data,
36 const Standard_Integer num,
37 Handle(Interface_Check)& ach,
38 const Handle(StepShape_DimensionalLocationWithPath) &ent) const
40 // Check number of parameters
41 if ( ! data->CheckNbParams(num,5,ach,"dimensional_location_with_path") ) return;
43 // Inherited fields of ShapeAspectRelationship
45 Handle(TCollection_HAsciiString) aShapeAspectRelationship_Name;
46 data->ReadString (num, 1, "shape_aspect_relationship.name", ach, aShapeAspectRelationship_Name);
48 Handle(TCollection_HAsciiString) aShapeAspectRelationship_Description;
49 Standard_Boolean hasShapeAspectRelationship_Description = Standard_True;
50 if ( data->IsParamDefined (num,2) ) {
51 data->ReadString (num, 2, "shape_aspect_relationship.description", ach, aShapeAspectRelationship_Description);
54 hasShapeAspectRelationship_Description = Standard_False;
57 Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatingShapeAspect;
58 data->ReadEntity (num, 3, "shape_aspect_relationship.relating_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatingShapeAspect);
60 Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatedShapeAspect;
61 data->ReadEntity (num, 4, "shape_aspect_relationship.related_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatedShapeAspect);
63 // Own fields of DimensionalLocationWithPath
65 Handle(StepRepr_ShapeAspect) aPath;
66 data->ReadEntity (num, 5, "path", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aPath);
69 ent->Init(aShapeAspectRelationship_Name,
70 hasShapeAspectRelationship_Description,
71 aShapeAspectRelationship_Description,
72 aShapeAspectRelationship_RelatingShapeAspect,
73 aShapeAspectRelationship_RelatedShapeAspect,
77 //=======================================================================
78 //function : WriteStep
80 //=======================================================================
82 void RWStepShape_RWDimensionalLocationWithPath::WriteStep (StepData_StepWriter& SW,
83 const Handle(StepShape_DimensionalLocationWithPath) &ent) const
86 // Inherited fields of ShapeAspectRelationship
88 SW.Send (ent->StepRepr_ShapeAspectRelationship::Name());
90 if ( ent->StepRepr_ShapeAspectRelationship::HasDescription() ) {
91 SW.Send (ent->StepRepr_ShapeAspectRelationship::Description());
95 SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
97 SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
99 // Own fields of DimensionalLocationWithPath
101 SW.Send (ent->Path());
104 //=======================================================================
107 //=======================================================================
109 void RWStepShape_RWDimensionalLocationWithPath::Share (const Handle(StepShape_DimensionalLocationWithPath) &ent,
110 Interface_EntityIterator& iter) const
113 // Inherited fields of ShapeAspectRelationship
115 iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
117 iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
119 // Own fields of DimensionalLocationWithPath
121 iter.AddItem (ent->Path());