0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[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_Check.hxx>
16 #include <Interface_EntityIterator.hxx>
17 #include <RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx>
18 #include <StepData_StepReaderData.hxx>
19 #include <StepData_StepWriter.hxx>
20 #include <StepGeom_GeometricRepresentationContext.hxx>
21 #include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx>
22
23 RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext () {}
24
25 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::ReadStep
26         (const Handle(StepData_StepReaderData)& data,
27          const Standard_Integer num0,
28          Handle(Interface_Check)& ach,
29          const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
30 {
31
32         Standard_Integer num = num0;
33
34
35         // --- Instance of plex componant GeometricRepresentationContext ---
36
37         if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return;
38
39         // --- field : coordinateSpaceDimension ---
40
41         Standard_Integer aCoordinateSpaceDimension;
42         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
43         data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
44
45         num = data->NextForComplex(num);
46
47         // --- Instance of plex componant ParametricRepresentationContext ---
48
49         if (!data->CheckNbParams(num,0,ach,"parametric_representation_context")) return;
50
51         num = data->NextForComplex(num);
52
53         // --- Instance of common supertype RepresentationContext ---
54
55         if (!data->CheckNbParams(num,2,ach,"representation_context")) return;
56
57         // --- field : contextIdentifier ---
58
59
60         Handle(TCollection_HAsciiString) aContextIdentifier;
61         //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
62         data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
63         // --- field : contextType ---
64
65
66         Handle(TCollection_HAsciiString) aContextType;
67         //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
68         data->ReadString (num,2,"context_type",ach,aContextType);
69
70         //--- Initialisation of the red entity ---
71
72         ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension);
73 }
74
75
76 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::WriteStep
77         (StepData_StepWriter& SW,
78          const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
79 {
80
81         // --- Instance of plex componant GeometricRepresentationContext ---
82
83         SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT");
84         // --- field : coordinateSpaceDimension ---
85
86         SW.Send(ent->CoordinateSpaceDimension());
87
88         // --- Instance of plex componant ParametricRepresentationContext ---
89
90         SW.StartEntity("PARAMETRIC_REPRESENTATION_CONTEXT");
91
92         // --- Instance of common supertype RepresentationContext ---
93
94         SW.StartEntity("REPRESENTATION_CONTEXT");
95         // --- field : contextIdentifier ---
96
97         SW.Send(ent->ContextIdentifier());
98         // --- field : contextType ---
99
100         SW.Send(ent->ContextType());
101 }
102
103
104 void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::Share(const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& , Interface_EntityIterator& ) const
105 {
106 }
107