b311480e |
1 | // Created on: 1995-12-07 |
2 | // Created by: Frederic MAUPAS |
3 | // Copyright (c) 1995-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | #include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.ixx> |
24 | |
25 | #include <StepGeom_GeometricRepresentationContext.hxx> |
26 | |
27 | #include <StepRepr_GlobalUnitAssignedContext.hxx> |
28 | |
29 | // -------------------------------------------------------------------------------------------------- |
30 | // Method : |
31 | // Purpose : |
32 | // -------------------------------------------------------------------------------------------------- |
33 | |
34 | StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx () {} |
35 | |
36 | // -------------------------------------------------------------------------------------------------- |
37 | // Method : |
38 | // Purpose : |
39 | // -------------------------------------------------------------------------------------------------- |
40 | |
41 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init |
42 | (const Handle(TCollection_HAsciiString)& aContextIdentifier, |
43 | const Handle(TCollection_HAsciiString)& aContextType) |
44 | { |
45 | StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType); |
46 | } |
47 | |
48 | // -------------------------------------------------------------------------------------------------- |
49 | // Method : |
50 | // Purpose : |
51 | // -------------------------------------------------------------------------------------------------- |
52 | |
53 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init |
54 | (const Handle(TCollection_HAsciiString)& aContextIdentifier, |
55 | const Handle(TCollection_HAsciiString)& aContextType, |
56 | const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext, |
57 | const Handle(StepRepr_GlobalUnitAssignedContext)& aGlobalUnitAssignedContext, |
58 | const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aGlobalUncertaintyAssignedCtx) |
59 | { |
60 | // --- classe own fields --- |
61 | geometricRepresentationContext = aGeometricRepresentationContext; |
62 | globalUnitAssignedContext = aGlobalUnitAssignedContext; |
63 | globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx; |
64 | // --- classe inherited fields --- |
65 | StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType); |
66 | } |
67 | |
68 | |
69 | // -------------------------------------------------------------------------------------------------- |
70 | // Method : |
71 | // Purpose : |
72 | // -------------------------------------------------------------------------------------------------- |
73 | |
74 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init |
75 | (const Handle(TCollection_HAsciiString)& aContextIdentifier, |
76 | const Handle(TCollection_HAsciiString)& aContextType, |
77 | const Standard_Integer aCoordinateSpaceDimension, |
78 | const Handle(StepBasic_HArray1OfNamedUnit)& aUnits, |
79 | const Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit)& anUncertainty) |
80 | { |
81 | // --- classe inherited fields --- |
82 | |
83 | StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType); |
84 | |
85 | // --- ANDOR componant fields : GeometricRepresentationContext --- |
86 | |
87 | geometricRepresentationContext = new StepGeom_GeometricRepresentationContext(); |
88 | geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension); |
89 | |
90 | // --- ANDOR componant fields : GlobalUnitAssignedContext --- |
91 | |
92 | globalUnitAssignedContext = new StepRepr_GlobalUnitAssignedContext(); |
93 | globalUnitAssignedContext->Init(aContextIdentifier, aContextType, aUnits); |
94 | |
95 | // --- ANDOR componant fields : GlobalUncertaintyAssignedContext --- |
96 | |
97 | globalUncertaintyAssignedContext = new StepRepr_GlobalUncertaintyAssignedContext(); |
98 | globalUncertaintyAssignedContext->Init(aContextIdentifier, aContextType, anUncertainty); |
99 | |
100 | } |
101 | |
102 | // -------------------------------------------------------------------------------------------------- |
103 | // Method : |
104 | // Purpose : |
105 | // -------------------------------------------------------------------------------------------------- |
106 | |
107 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext) |
108 | { |
109 | geometricRepresentationContext = aGeometricRepresentationContext; |
110 | } |
111 | |
112 | // -------------------------------------------------------------------------------------------------- |
113 | // Method : |
114 | // Purpose : |
115 | // -------------------------------------------------------------------------------------------------- |
116 | |
117 | Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GeometricRepresentationContext() const |
118 | { |
119 | return geometricRepresentationContext; |
120 | } |
121 | |
122 | // -------------------------------------------------------------------------------------------------- |
123 | // Method : |
124 | // Purpose : |
125 | // -------------------------------------------------------------------------------------------------- |
126 | |
127 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUnitAssignedContext |
128 | (const Handle(StepRepr_GlobalUnitAssignedContext)& aGlobalUnitAssignedContext) |
129 | { |
130 | globalUnitAssignedContext = aGlobalUnitAssignedContext; |
131 | } |
132 | |
133 | // -------------------------------------------------------------------------------------------------- |
134 | // Method : |
135 | // Purpose : |
136 | // -------------------------------------------------------------------------------------------------- |
137 | |
138 | Handle(StepRepr_GlobalUnitAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUnitAssignedContext() const |
139 | { |
140 | return globalUnitAssignedContext; |
141 | } |
142 | |
143 | // -------------------------------------------------------------------------------------------------- |
144 | // Method : |
145 | // Purpose : |
146 | // -------------------------------------------------------------------------------------------------- |
147 | |
148 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUncertaintyAssignedContext |
149 | (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aGlobalUncertaintyAssignedCtx) |
150 | { |
151 | globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx; |
152 | } |
153 | |
154 | |
155 | // -------------------------------------------------------------------------------------------------- |
156 | // Method : |
157 | // Purpose : |
158 | // -------------------------------------------------------------------------------------------------- |
159 | |
160 | Handle(StepRepr_GlobalUncertaintyAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUncertaintyAssignedContext() const |
161 | { |
162 | return globalUncertaintyAssignedContext; |
163 | } |
164 | |
165 | //------------------------------------------------------------------------------------- |
166 | //--- Specific Methods for AND classe field access : GeometricRepresentationContext --- |
167 | //------------------------------------------------------------------------------------- |
168 | |
169 | // -------------------------------------------------------------------------------------------------- |
170 | // Method : |
171 | // Purpose : |
172 | // -------------------------------------------------------------------------------------------------- |
173 | |
174 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension) |
175 | { |
176 | geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension); |
177 | } |
178 | |
179 | // -------------------------------------------------------------------------------------------------- |
180 | // Method : |
181 | // Purpose : |
182 | // -------------------------------------------------------------------------------------------------- |
183 | |
184 | Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::CoordinateSpaceDimension() const |
185 | { |
186 | return geometricRepresentationContext->CoordinateSpaceDimension(); |
187 | } |
188 | |
189 | //--------------------------------------------------------------------------------- |
190 | //--- Specific Methods for AND classe field access : GlobalUnitAssignedContext --- |
191 | //--------------------------------------------------------------------------------- |
192 | |
193 | // -------------------------------------------------------------------------------------------------- |
194 | // Method : |
195 | // Purpose : |
196 | // -------------------------------------------------------------------------------------------------- |
197 | |
198 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUnits(const Handle(StepBasic_HArray1OfNamedUnit)& aUnits) |
199 | { |
200 | globalUnitAssignedContext->SetUnits(aUnits); |
201 | } |
202 | |
203 | // -------------------------------------------------------------------------------------------------- |
204 | // Method : |
205 | // Purpose : |
206 | // -------------------------------------------------------------------------------------------------- |
207 | |
208 | Handle(StepBasic_HArray1OfNamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Units() const |
209 | { |
210 | return globalUnitAssignedContext->Units(); |
211 | } |
212 | |
213 | // -------------------------------------------------------------------------------------------------- |
214 | // Method : |
215 | // Purpose : |
216 | // -------------------------------------------------------------------------------------------------- |
217 | |
218 | Handle(StepBasic_NamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UnitsValue(const Standard_Integer num) const |
219 | { |
220 | return globalUnitAssignedContext->UnitsValue(num); |
221 | } |
222 | |
223 | // -------------------------------------------------------------------------------------------------- |
224 | // Method : |
225 | // Purpose : |
226 | // -------------------------------------------------------------------------------------------------- |
227 | |
228 | Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUnits () const |
229 | { |
230 | return globalUnitAssignedContext->NbUnits(); |
231 | } |
232 | |
233 | |
234 | //---------------------------------------------------------------------------------------- |
235 | //--- Specific Methods for AND classe field access : GlobalUncertaintyAssignedContext --- |
236 | //---------------------------------------------------------------------------------------- |
237 | |
238 | // -------------------------------------------------------------------------------------------------- |
239 | // Method : |
240 | // Purpose : |
241 | // -------------------------------------------------------------------------------------------------- |
242 | |
243 | void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUncertainty(const Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit)& aUncertainty) |
244 | { |
245 | globalUncertaintyAssignedContext->SetUncertainty(aUncertainty); |
246 | } |
247 | |
248 | // -------------------------------------------------------------------------------------------------- |
249 | // Method : |
250 | // Purpose : |
251 | // -------------------------------------------------------------------------------------------------- |
252 | |
253 | Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Uncertainty() const |
254 | { |
255 | return globalUncertaintyAssignedContext->Uncertainty(); |
256 | } |
257 | |
258 | // -------------------------------------------------------------------------------------------------- |
259 | // Method : |
260 | // Purpose : |
261 | // -------------------------------------------------------------------------------------------------- |
262 | |
263 | Handle(StepBasic_UncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UncertaintyValue(const Standard_Integer num) const |
264 | { |
265 | return globalUncertaintyAssignedContext->UncertaintyValue(num); |
266 | } |
267 | |
268 | // -------------------------------------------------------------------------------------------------- |
269 | // Method : |
270 | // Purpose : |
271 | // -------------------------------------------------------------------------------------------------- |
272 | |
273 | Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUncertainty() const |
274 | { |
275 | return globalUncertaintyAssignedContext->NbUncertainty(); |
276 | } |