1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13 
14 
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>
21 
IMPLEMENT_STANDARD_RTTIEXT(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext,StepRepr_RepresentationContext)22 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext,StepRepr_RepresentationContext)
23 
24 StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::StepGeom_GeometricRepresentationContextAndParametricRepresentationContext ()  {}
25 
Init(const Handle (TCollection_HAsciiString)& aContextIdentifier,const Handle (TCollection_HAsciiString)& aContextType,const Handle (StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext,const Handle (StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext)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)
31 {
32   // --- classe own fields ---
33   geometricRepresentationContext = aGeometricRepresentationContext;
34   parametricRepresentationContext= aParametricRepresentationContext;
35   // --- classe inherited fields ---
36   StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
37 }
38 
39 
Init(const Handle (TCollection_HAsciiString)& aContextIdentifier,const Handle (TCollection_HAsciiString)& aContextType,const Standard_Integer aCoordinateSpaceDimension)40 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::Init
41 (const Handle(TCollection_HAsciiString)& aContextIdentifier,
42  const Handle(TCollection_HAsciiString)& aContextType,
43  const Standard_Integer aCoordinateSpaceDimension)
44 {
45   // --- classe inherited fields ---
46 
47   StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType);
48 
49   // --- ANDOR component fields ---
50 
51   geometricRepresentationContext = new StepGeom_GeometricRepresentationContext();
52   geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension);
53 
54   // --- ANDOR component fields ---
55 
56   parametricRepresentationContext = new StepRepr_ParametricRepresentationContext();
57   parametricRepresentationContext->Init(aContextIdentifier, aContextType);
58 }
59 
60 
SetGeometricRepresentationContext(const Handle (StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext)61 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext)
62 {
63   geometricRepresentationContext = aGeometricRepresentationContext;
64 }
65 
Handle(StepGeom_GeometricRepresentationContext)66 Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::GeometricRepresentationContext() const
67 {
68   return geometricRepresentationContext;
69 }
70 
SetParametricRepresentationContext(const Handle (StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext)71 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetParametricRepresentationContext(const Handle(StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext)
72 {
73   parametricRepresentationContext = aParametricRepresentationContext;
74 }
75 
Handle(StepRepr_ParametricRepresentationContext)76 Handle(StepRepr_ParametricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::ParametricRepresentationContext() const
77 {
78 	return parametricRepresentationContext;
79 }
80 
81 //--- Specific Methods for AND classe field access ---
82 
83 
SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension)84 void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension)
85 {
86   geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension);
87 }
88 
CoordinateSpaceDimension() const89 Standard_Integer StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::CoordinateSpaceDimension() const
90 {
91   return geometricRepresentationContext->CoordinateSpaceDimension();
92 }
93