b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | |
19 | #include <RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.ixx> |
20 | #include <StepGeom_GeometricRepresentationContext.hxx> |
21 | |
22 | #include <Interface_EntityIterator.hxx> |
23 | |
24 | |
25 | #include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx> |
26 | |
27 | |
28 | RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext () {} |
29 | |
30 | void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::ReadStep |
31 | (const Handle(StepData_StepReaderData)& data, |
32 | const Standard_Integer num0, |
33 | Handle(Interface_Check)& ach, |
34 | const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const |
35 | { |
36 | |
37 | Standard_Integer num = num0; |
38 | |
39 | |
40 | // --- Instance of plex componant GeometricRepresentationContext --- |
41 | |
42 | if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return; |
43 | |
44 | // --- field : coordinateSpaceDimension --- |
45 | |
46 | Standard_Integer aCoordinateSpaceDimension; |
47 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
48 | data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension); |
49 | |
50 | num = data->NextForComplex(num); |
51 | |
52 | // --- Instance of plex componant ParametricRepresentationContext --- |
53 | |
54 | if (!data->CheckNbParams(num,0,ach,"parametric_representation_context")) return; |
55 | |
56 | num = data->NextForComplex(num); |
57 | |
58 | // --- Instance of common supertype RepresentationContext --- |
59 | |
60 | if (!data->CheckNbParams(num,2,ach,"representation_context")) return; |
61 | |
62 | // --- field : contextIdentifier --- |
63 | |
64 | |
65 | Handle(TCollection_HAsciiString) aContextIdentifier; |
66 | //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed |
67 | data->ReadString (num,1,"context_identifier",ach,aContextIdentifier); |
68 | // --- field : contextType --- |
69 | |
70 | |
71 | Handle(TCollection_HAsciiString) aContextType; |
72 | //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed |
73 | data->ReadString (num,2,"context_type",ach,aContextType); |
74 | |
75 | //--- Initialisation of the red entity --- |
76 | |
77 | ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension); |
78 | } |
79 | |
80 | |
81 | void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::WriteStep |
82 | (StepData_StepWriter& SW, |
83 | const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const |
84 | { |
85 | |
86 | // --- Instance of plex componant GeometricRepresentationContext --- |
87 | |
88 | SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT"); |
89 | // --- field : coordinateSpaceDimension --- |
90 | |
91 | SW.Send(ent->CoordinateSpaceDimension()); |
92 | |
93 | // --- Instance of plex componant ParametricRepresentationContext --- |
94 | |
95 | SW.StartEntity("PARAMETRIC_REPRESENTATION_CONTEXT"); |
96 | |
97 | // --- Instance of common supertype RepresentationContext --- |
98 | |
99 | SW.StartEntity("REPRESENTATION_CONTEXT"); |
100 | // --- field : contextIdentifier --- |
101 | |
102 | SW.Send(ent->ContextIdentifier()); |
103 | // --- field : contextType --- |
104 | |
105 | SW.Send(ent->ContextType()); |
106 | } |
107 | |
108 | |
35e08fe8 |
109 | void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::Share(const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& , Interface_EntityIterator& ) const |
7fd59977 |
110 | { |
111 | } |
112 | |