1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Standard_Type.hxx>
16 #include <StepGeom_GeometricRepresentationContext.hxx>
17 #include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx>
18 #include <StepRepr_GlobalUnitAssignedContext.hxx>
19 #include <StepRepr_ParametricRepresentationContext.hxx>
20 #include <TCollection_HAsciiString.hxx>
22 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext,StepRepr_RepresentationContext)
24 StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::StepGeom_GeometricRepresentationContextAndParametricRepresentationContext () {}
26 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::Init
27 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
28 const Handle(TCollection_HAsciiString)& aContextType,
29 const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext,
30 const Handle(StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext)
32 // --- classe own fields ---
33 geometricRepresentationContext = aGeometricRepresentationContext;
34 parametricRepresentationContext= aParametricRepresentationContext;
35 // --- classe inherited fields ---
36 StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
40 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::Init
41 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
42 const Handle(TCollection_HAsciiString)& aContextType,
43 const Standard_Integer aCoordinateSpaceDimension)
45 // --- classe inherited fields ---
47 StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
49 // --- ANDOR componant fields ---
51 geometricRepresentationContext = new StepGeom_GeometricRepresentationContext();
52 geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension);
54 // --- ANDOR componant fields ---
56 parametricRepresentationContext = new StepRepr_ParametricRepresentationContext();
57 parametricRepresentationContext->Init(aContextIdentifier, aContextType);
61 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext)
63 geometricRepresentationContext = aGeometricRepresentationContext;
66 Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::GeometricRepresentationContext() const
68 return geometricRepresentationContext;
71 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetParametricRepresentationContext(const Handle(StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext)
73 parametricRepresentationContext = aParametricRepresentationContext;
76 Handle(StepRepr_ParametricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::ParametricRepresentationContext() const
78 return parametricRepresentationContext;
81 //--- Specific Methods for AND classe field access ---
84 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension)
86 geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension);
89 Standard_Integer StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::CoordinateSpaceDimension() const
91 return geometricRepresentationContext->CoordinateSpaceDimension();