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