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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.ixx>
19 #include <StepGeom_GeometricRepresentationContext.hxx>
21 #include <StepRepr_GlobalUnitAssignedContext.hxx>
23 // --------------------------------------------------------------------------------------------------
26 // --------------------------------------------------------------------------------------------------
28 StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx () {}
30 // --------------------------------------------------------------------------------------------------
33 // --------------------------------------------------------------------------------------------------
35 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Init
36 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
37 const Handle(TCollection_HAsciiString)& aContextType)
39 StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
42 // --------------------------------------------------------------------------------------------------
45 // --------------------------------------------------------------------------------------------------
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)
54 // --- classe own fields ---
55 geometricRepresentationContext = aGeometricRepresentationContext;
56 globalUnitAssignedContext = aGlobalUnitAssignedContext;
57 globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx;
58 // --- classe inherited fields ---
59 StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
63 // --------------------------------------------------------------------------------------------------
66 // --------------------------------------------------------------------------------------------------
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)
75 // --- classe inherited fields ---
77 StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
79 // --- ANDOR componant fields : GeometricRepresentationContext ---
81 geometricRepresentationContext = new StepGeom_GeometricRepresentationContext();
82 geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension);
84 // --- ANDOR componant fields : GlobalUnitAssignedContext ---
86 globalUnitAssignedContext = new StepRepr_GlobalUnitAssignedContext();
87 globalUnitAssignedContext->Init(aContextIdentifier, aContextType, aUnits);
89 // --- ANDOR componant fields : GlobalUncertaintyAssignedContext ---
91 globalUncertaintyAssignedContext = new StepRepr_GlobalUncertaintyAssignedContext();
92 globalUncertaintyAssignedContext->Init(aContextIdentifier, aContextType, anUncertainty);
96 // --------------------------------------------------------------------------------------------------
99 // --------------------------------------------------------------------------------------------------
101 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext)
103 geometricRepresentationContext = aGeometricRepresentationContext;
106 // --------------------------------------------------------------------------------------------------
109 // --------------------------------------------------------------------------------------------------
111 Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GeometricRepresentationContext() const
113 return geometricRepresentationContext;
116 // --------------------------------------------------------------------------------------------------
119 // --------------------------------------------------------------------------------------------------
121 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUnitAssignedContext
122 (const Handle(StepRepr_GlobalUnitAssignedContext)& aGlobalUnitAssignedContext)
124 globalUnitAssignedContext = aGlobalUnitAssignedContext;
127 // --------------------------------------------------------------------------------------------------
130 // --------------------------------------------------------------------------------------------------
132 Handle(StepRepr_GlobalUnitAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUnitAssignedContext() const
134 return globalUnitAssignedContext;
137 // --------------------------------------------------------------------------------------------------
140 // --------------------------------------------------------------------------------------------------
142 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetGlobalUncertaintyAssignedContext
143 (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aGlobalUncertaintyAssignedCtx)
145 globalUncertaintyAssignedContext = aGlobalUncertaintyAssignedCtx;
149 // --------------------------------------------------------------------------------------------------
152 // --------------------------------------------------------------------------------------------------
154 Handle(StepRepr_GlobalUncertaintyAssignedContext) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::GlobalUncertaintyAssignedContext() const
156 return globalUncertaintyAssignedContext;
159 //-------------------------------------------------------------------------------------
160 //--- Specific Methods for AND classe field access : GeometricRepresentationContext ---
161 //-------------------------------------------------------------------------------------
163 // --------------------------------------------------------------------------------------------------
166 // --------------------------------------------------------------------------------------------------
168 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension)
170 geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension);
173 // --------------------------------------------------------------------------------------------------
176 // --------------------------------------------------------------------------------------------------
178 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::CoordinateSpaceDimension() const
180 return geometricRepresentationContext->CoordinateSpaceDimension();
183 //---------------------------------------------------------------------------------
184 //--- Specific Methods for AND classe field access : GlobalUnitAssignedContext ---
185 //---------------------------------------------------------------------------------
187 // --------------------------------------------------------------------------------------------------
190 // --------------------------------------------------------------------------------------------------
192 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUnits(const Handle(StepBasic_HArray1OfNamedUnit)& aUnits)
194 globalUnitAssignedContext->SetUnits(aUnits);
197 // --------------------------------------------------------------------------------------------------
200 // --------------------------------------------------------------------------------------------------
202 Handle(StepBasic_HArray1OfNamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Units() const
204 return globalUnitAssignedContext->Units();
207 // --------------------------------------------------------------------------------------------------
210 // --------------------------------------------------------------------------------------------------
212 Handle(StepBasic_NamedUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UnitsValue(const Standard_Integer num) const
214 return globalUnitAssignedContext->UnitsValue(num);
217 // --------------------------------------------------------------------------------------------------
220 // --------------------------------------------------------------------------------------------------
222 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUnits () const
224 return globalUnitAssignedContext->NbUnits();
228 //----------------------------------------------------------------------------------------
229 //--- Specific Methods for AND classe field access : GlobalUncertaintyAssignedContext ---
230 //----------------------------------------------------------------------------------------
232 // --------------------------------------------------------------------------------------------------
235 // --------------------------------------------------------------------------------------------------
237 void StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::SetUncertainty(const Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit)& aUncertainty)
239 globalUncertaintyAssignedContext->SetUncertainty(aUncertainty);
242 // --------------------------------------------------------------------------------------------------
245 // --------------------------------------------------------------------------------------------------
247 Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Uncertainty() const
249 return globalUncertaintyAssignedContext->Uncertainty();
252 // --------------------------------------------------------------------------------------------------
255 // --------------------------------------------------------------------------------------------------
257 Handle(StepBasic_UncertaintyMeasureWithUnit) StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::UncertaintyValue(const Standard_Integer num) const
259 return globalUncertaintyAssignedContext->UncertaintyValue(num);
262 // --------------------------------------------------------------------------------------------------
265 // --------------------------------------------------------------------------------------------------
267 Standard_Integer StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::NbUncertainty() const
269 return globalUncertaintyAssignedContext->NbUncertainty();