0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis]
[occt.git] / src / RWStepGeom / RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Interface_EntityIterator.hxx>
16 #include <RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx>
17 #include <StepData_StepReaderData.hxx>
18 #include <StepData_StepWriter.hxx>
19 #include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx>
20
21 RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext () {}
22
23 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::ReadStep
24         (const Handle(StepData_StepReaderData)& data,
25          const Standard_Integer num0,
26          Handle(Interface_Check)& ach,
27          const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
28 {
29
30         Standard_Integer num = num0;
31
32
33         // --- Instance of plex component GeometricRepresentationContext ---
34
35         if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return;
36
37         // --- field : coordinateSpaceDimension ---
38
39         Standard_Integer aCoordinateSpaceDimension;
40         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
41         data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
42
43         num = data->NextForComplex(num);
44
45         // --- Instance of plex component ParametricRepresentationContext ---
46
47         if (!data->CheckNbParams(num,0,ach,"parametric_representation_context")) return;
48
49         num = data->NextForComplex(num);
50
51         // --- Instance of common supertype RepresentationContext ---
52
53         if (!data->CheckNbParams(num,2,ach,"representation_context")) return;
54
55         // --- field : contextIdentifier ---
56
57
58         Handle(TCollection_HAsciiString) aContextIdentifier;
59         //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
60         data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
61         // --- field : contextType ---
62
63
64         Handle(TCollection_HAsciiString) aContextType;
65         //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
66         data->ReadString (num,2,"context_type",ach,aContextType);
67
68         //--- Initialisation of the red entity ---
69
70         ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension);
71 }
72
73
74 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::WriteStep
75         (StepData_StepWriter& SW,
76          const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
77 {
78
79         // --- Instance of plex component GeometricRepresentationContext ---
80
81         SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT");
82         // --- field : coordinateSpaceDimension ---
83
84         SW.Send(ent->CoordinateSpaceDimension());
85
86         // --- Instance of plex component ParametricRepresentationContext ---
87
88         SW.StartEntity("PARAMETRIC_REPRESENTATION_CONTEXT");
89
90         // --- Instance of common supertype RepresentationContext ---
91
92         SW.StartEntity("REPRESENTATION_CONTEXT");
93         // --- field : contextIdentifier ---
94
95         SW.Send(ent->ContextIdentifier());
96         // --- field : contextType ---
97
98         SW.Send(ent->ContextType());
99 }
100
101
102 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::Share(const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& , Interface_EntityIterator& ) const
103 {
104 }
105