0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / RWStepShape / RWStepShape_RWSeamEdge.cxx
CommitLineData
b311480e 1// Created on: 2002-01-04
2// Created by: data exchange team
973c2be1 3// Copyright (c) 2002-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
7fd59977 16// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
7fd59977 17
42cf5bc1 18#include <Interface_Check.hxx>
19#include <Interface_EntityIterator.hxx>
20#include <RWStepShape_RWSeamEdge.hxx>
21#include <StepData_StepReaderData.hxx>
22#include <StepData_StepWriter.hxx>
23#include <StepGeom_Pcurve.hxx>
ec357c5c 24#include <StepShape_Edge.hxx>
42cf5bc1 25#include <StepShape_SeamEdge.hxx>
c04c30b3 26#include <StepShape_Vertex.hxx>
7fd59977 27
28//=======================================================================
29//function : RWStepShape_RWSeamEdge
30//purpose :
31//=======================================================================
7fd59977 32RWStepShape_RWSeamEdge::RWStepShape_RWSeamEdge ()
33{
34}
35
36//=======================================================================
37//function : ReadStep
38//purpose :
39//=======================================================================
40
41void RWStepShape_RWSeamEdge::ReadStep (const Handle(StepData_StepReaderData)& data,
42 const Standard_Integer num,
43 Handle(Interface_Check)& ach,
44 const Handle(StepShape_SeamEdge) &ent) const
45{
46 // Check number of parameters
47 if ( ! data->CheckNbParams(num,6,ach,"seam_edge") ) return;
48
49 // Inherited fields of RepresentationItem
50
51 Handle(TCollection_HAsciiString) aRepresentationItem_Name;
52 data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
53
54 // Inherited fields of Edge
55
56 Handle(StepShape_Vertex) aEdge_EdgeStart;
57 data->CheckDerived(num, 2, "edge.edge_start", ach,Standard_False);
58
59 Handle(StepShape_Vertex) aEdge_EdgeEnd;
60 data->CheckDerived (num, 3, "edge.edge_end", ach, Standard_False);
61
62 // Inherited fields of OrientedEdge
63
64 Handle(StepShape_Edge) aOrientedEdge_EdgeElement;
65 data->ReadEntity (num, 4, "oriented_edge.edge_element", ach, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement);
66
67 Standard_Boolean aOrientedEdge_Orientation;
68 data->ReadBoolean (num, 5, "oriented_edge.orientation", ach, aOrientedEdge_Orientation);
69
70 // Own fields of SeamEdge
71
72 Handle(StepGeom_Pcurve) aPcurveReference;
73 data->ReadEntity (num, 6, "pcurve_reference", ach, STANDARD_TYPE(StepGeom_Pcurve), aPcurveReference);
74
75 // Initialize entity
76
77 ent->Init(aRepresentationItem_Name,
78 aOrientedEdge_EdgeElement,
79 aOrientedEdge_Orientation,
80 aPcurveReference);
81}
82
83//=======================================================================
84//function : WriteStep
85//purpose :
86//=======================================================================
87
88void RWStepShape_RWSeamEdge::WriteStep (StepData_StepWriter& SW,
89 const Handle(StepShape_SeamEdge) &ent) const
90{
91
92 // Inherited fields of RepresentationItem
93
94 SW.Send (ent->StepRepr_RepresentationItem::Name());
95
96 // Inherited fields of Edge
97
98 SW.Send (ent->StepShape_Edge::EdgeStart());
99
100 SW.Send (ent->StepShape_Edge::EdgeEnd());
101
102 // Inherited fields of OrientedEdge
103
104 SW.Send (ent->StepShape_OrientedEdge::EdgeElement());
105
106 SW.SendBoolean (ent->StepShape_OrientedEdge::Orientation());
107
108 // Own fields of SeamEdge
109
110 SW.Send (ent->PcurveReference());
111}
112
113//=======================================================================
114//function : Share
115//purpose :
116//=======================================================================
117
118void RWStepShape_RWSeamEdge::Share (const Handle(StepShape_SeamEdge) &ent,
119 Interface_EntityIterator& iter) const
120{
121
122 // Inherited fields of RepresentationItem
123
124 // Inherited fields of Edge
125
126 iter.AddItem (ent->StepShape_Edge::EdgeStart());
127
128 iter.AddItem (ent->StepShape_Edge::EdgeEnd());
129
130 // Inherited fields of OrientedEdge
131
132 iter.AddItem (ent->StepShape_OrientedEdge::EdgeElement());
133
134 // Own fields of SeamEdge
135
136 iter.AddItem (ent->PcurveReference());
137}