1 // Created on: 2002-01-04
2 // Created by: data exchange team
3 // Copyright (c) 2002-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.1
18 #include <RWStepShape_RWSubedge.ixx>
19 #include <StepShape_Vertex.hxx>
20 #include <StepShape_Edge.hxx>
22 //=======================================================================
23 //function : RWStepShape_RWSubedge
25 //=======================================================================
27 RWStepShape_RWSubedge::RWStepShape_RWSubedge ()
31 //=======================================================================
34 //=======================================================================
36 void RWStepShape_RWSubedge::ReadStep (const Handle(StepData_StepReaderData)& data,
37 const Standard_Integer num,
38 Handle(Interface_Check)& ach,
39 const Handle(StepShape_Subedge) &ent) const
41 // Check number of parameters
42 if ( ! data->CheckNbParams(num,4,ach,"subedge") ) return;
44 // Inherited fields of RepresentationItem
46 Handle(TCollection_HAsciiString) aRepresentationItem_Name;
47 data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
49 // Inherited fields of Edge
51 Handle(StepShape_Vertex) aEdge_EdgeStart;
52 data->ReadEntity (num, 2, "edge.edge_start", ach, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeStart);
54 Handle(StepShape_Vertex) aEdge_EdgeEnd;
55 data->ReadEntity (num, 3, "edge.edge_end", ach, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeEnd);
57 // Own fields of Subedge
59 Handle(StepShape_Edge) aParentEdge;
60 data->ReadEntity (num, 4, "parent_edge", ach, STANDARD_TYPE(StepShape_Edge), aParentEdge);
63 ent->Init(aRepresentationItem_Name,
69 //=======================================================================
70 //function : WriteStep
72 //=======================================================================
74 void RWStepShape_RWSubedge::WriteStep (StepData_StepWriter& SW,
75 const Handle(StepShape_Subedge) &ent) const
78 // Inherited fields of RepresentationItem
80 SW.Send (ent->StepRepr_RepresentationItem::Name());
82 // Inherited fields of Edge
84 SW.Send (ent->StepShape_Edge::EdgeStart());
86 SW.Send (ent->StepShape_Edge::EdgeEnd());
88 // Own fields of Subedge
90 SW.Send (ent->ParentEdge());
93 //=======================================================================
96 //=======================================================================
98 void RWStepShape_RWSubedge::Share (const Handle(StepShape_Subedge) &ent,
99 Interface_EntityIterator& iter) const
102 // Inherited fields of RepresentationItem
104 // Inherited fields of Edge
106 iter.AddItem (ent->StepShape_Edge::EdgeStart());
108 iter.AddItem (ent->StepShape_Edge::EdgeEnd());
110 // Own fields of Subedge
112 iter.AddItem (ent->ParentEdge());