0024624: Lost word in license statement in source files
[occt.git] / src / StepGeom / StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx
1 // Created on: 1995-12-07
2 // Created by: Frederic MAUPAS
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.ixx>
18
19 #include <StepGeom_GeometricRepresentationContext.hxx>
20
21 #include <StepRepr_GlobalUnitAssignedContext.hxx>
22
23 // --------------------------------------------------------------------------------------------------
24 // Method  :
25 // Purpose :
26 // --------------------------------------------------------------------------------------------------
27
28 StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx ()  {}
29
30 // --------------------------------------------------------------------------------------------------
31 // Method  :
32 // Purpose :
33 // --------------------------------------------------------------------------------------------------
34
35 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init
36 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
37  const Handle(TCollection_HAsciiString)& aContextType)
38 {
39   StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
40 }
41
42 // --------------------------------------------------------------------------------------------------
43 // Method  :
44 // Purpose :
45 // --------------------------------------------------------------------------------------------------
46
47 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init
48 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
49  const Handle(TCollection_HAsciiString)& aContextType,
50  const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext,
51  const Handle(StepRepr_GlobalUnitAssignedContext)& aGlobalUnitAssignedContext,
52  const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aGlobalUncertaintyAssignedCtx)
53 {
54   // --- classe own fields ---
55   geometricRepresentationContext   = aGeometricRepresentationContext;
56   globalUnitAssignedContext        = aGlobalUnitAssignedContext;
57   globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx;
58   // --- classe inherited fields ---
59   StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
60 }
61
62
63 // --------------------------------------------------------------------------------------------------
64 // Method  :
65 // Purpose :
66 // --------------------------------------------------------------------------------------------------
67
68 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init
69 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
70  const Handle(TCollection_HAsciiString)& aContextType,
71  const Standard_Integer aCoordinateSpaceDimension,
72  const Handle(StepBasic_HArray1OfNamedUnit)& aUnits,
73  const Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit)& anUncertainty)
74 {
75   // --- classe inherited fields ---
76
77   StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
78   
79   // --- ANDOR componant fields : GeometricRepresentationContext ---
80   
81   geometricRepresentationContext = new StepGeom_GeometricRepresentationContext();
82   geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension);
83   
84   // --- ANDOR componant fields : GlobalUnitAssignedContext ---
85   
86   globalUnitAssignedContext = new StepRepr_GlobalUnitAssignedContext();
87   globalUnitAssignedContext->Init(aContextIdentifier, aContextType, aUnits);
88
89   // --- ANDOR componant fields : GlobalUncertaintyAssignedContext ---
90
91   globalUncertaintyAssignedContext = new StepRepr_GlobalUncertaintyAssignedContext();
92   globalUncertaintyAssignedContext->Init(aContextIdentifier, aContextType, anUncertainty);
93   
94 }
95
96 // --------------------------------------------------------------------------------------------------
97 // Method  :
98 // Purpose :
99 // --------------------------------------------------------------------------------------------------
100
101 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext)
102 {
103   geometricRepresentationContext = aGeometricRepresentationContext;
104 }
105
106 // --------------------------------------------------------------------------------------------------
107 // Method  :
108 // Purpose :
109 // --------------------------------------------------------------------------------------------------
110
111 Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GeometricRepresentationContext() const
112 {
113   return geometricRepresentationContext;
114 }
115
116 // --------------------------------------------------------------------------------------------------
117 // Method  :
118 // Purpose :
119 // --------------------------------------------------------------------------------------------------
120
121 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUnitAssignedContext
122 (const Handle(StepRepr_GlobalUnitAssignedContext)& aGlobalUnitAssignedContext)
123 {
124   globalUnitAssignedContext = aGlobalUnitAssignedContext;
125 }
126
127 // --------------------------------------------------------------------------------------------------
128 // Method  :
129 // Purpose :
130 // --------------------------------------------------------------------------------------------------
131
132 Handle(StepRepr_GlobalUnitAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUnitAssignedContext() const
133 {
134   return globalUnitAssignedContext;
135 }
136
137 // --------------------------------------------------------------------------------------------------
138 // Method  :
139 // Purpose :
140 // --------------------------------------------------------------------------------------------------
141
142 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUncertaintyAssignedContext
143 (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aGlobalUncertaintyAssignedCtx)
144 {
145   globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx;
146 }
147
148
149 // --------------------------------------------------------------------------------------------------
150 // Method  :
151 // Purpose :
152 // --------------------------------------------------------------------------------------------------
153
154 Handle(StepRepr_GlobalUncertaintyAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUncertaintyAssignedContext() const
155 {
156   return globalUncertaintyAssignedContext;
157 }
158
159 //-------------------------------------------------------------------------------------
160 //--- Specific Methods for AND classe field access : GeometricRepresentationContext ---
161 //-------------------------------------------------------------------------------------
162
163 // --------------------------------------------------------------------------------------------------
164 // Method  :
165 // Purpose :
166 // --------------------------------------------------------------------------------------------------
167
168 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension)
169 {
170   geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension);
171 }
172
173 // --------------------------------------------------------------------------------------------------
174 // Method  :
175 // Purpose :
176 // --------------------------------------------------------------------------------------------------
177
178 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::CoordinateSpaceDimension() const
179 {
180   return geometricRepresentationContext->CoordinateSpaceDimension();
181 }
182
183 //---------------------------------------------------------------------------------
184 //--- Specific Methods for AND classe field access : GlobalUnitAssignedContext  ---
185 //---------------------------------------------------------------------------------
186
187 // --------------------------------------------------------------------------------------------------
188 // Method  :
189 // Purpose :
190 // --------------------------------------------------------------------------------------------------
191
192 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUnits(const Handle(StepBasic_HArray1OfNamedUnit)& aUnits)
193 {
194   globalUnitAssignedContext->SetUnits(aUnits);
195 }
196
197 // --------------------------------------------------------------------------------------------------
198 // Method  :
199 // Purpose :
200 // --------------------------------------------------------------------------------------------------
201
202 Handle(StepBasic_HArray1OfNamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Units() const
203 {
204   return globalUnitAssignedContext->Units();
205 }
206
207 // --------------------------------------------------------------------------------------------------
208 // Method  :
209 // Purpose :
210 // --------------------------------------------------------------------------------------------------
211
212 Handle(StepBasic_NamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UnitsValue(const Standard_Integer num) const
213 {
214   return globalUnitAssignedContext->UnitsValue(num);
215 }
216
217 // --------------------------------------------------------------------------------------------------
218 // Method  :
219 // Purpose :
220 // --------------------------------------------------------------------------------------------------
221
222 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUnits () const
223 {
224   return globalUnitAssignedContext->NbUnits();
225 }
226
227
228 //----------------------------------------------------------------------------------------
229 //--- Specific Methods for AND classe field access : GlobalUncertaintyAssignedContext  ---
230 //----------------------------------------------------------------------------------------
231
232 // --------------------------------------------------------------------------------------------------
233 // Method  :
234 // Purpose :
235 // --------------------------------------------------------------------------------------------------
236
237 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUncertainty(const Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit)& aUncertainty)
238 {
239   globalUncertaintyAssignedContext->SetUncertainty(aUncertainty);
240 }
241
242 // --------------------------------------------------------------------------------------------------
243 // Method  :
244 // Purpose :
245 // --------------------------------------------------------------------------------------------------
246
247 Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Uncertainty() const
248 {
249   return globalUncertaintyAssignedContext->Uncertainty();
250 }
251
252 // --------------------------------------------------------------------------------------------------
253 // Method  :
254 // Purpose :
255 // --------------------------------------------------------------------------------------------------
256
257 Handle(StepBasic_UncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UncertaintyValue(const Standard_Integer num) const 
258 {
259   return globalUncertaintyAssignedContext->UncertaintyValue(num);
260 }
261
262 // --------------------------------------------------------------------------------------------------
263 // Method  :
264 // Purpose :
265 // --------------------------------------------------------------------------------------------------
266
267 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUncertainty() const
268 {
269   return globalUncertaintyAssignedContext->NbUncertainty();
270 }