973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
7fd59977 |
16 | #include <StepGeom_GeometricRepresentationContext.hxx> |
42cf5bc1 |
17 | #include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx> |
7fd59977 |
18 | #include <StepRepr_GlobalUnitAssignedContext.hxx> |
42cf5bc1 |
19 | #include <StepRepr_ParametricRepresentationContext.hxx> |
20 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
21 | |
92efcf78 |
22 | IMPLEMENT_STANDARD_RTTIEXT(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext,StepRepr_RepresentationContext) |
23 | |
7fd59977 |
24 | StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::StepGeom_GeometricRepresentationContextAndParametricRepresentationContext () {} |
25 | |
7fd59977 |
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 | |
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 | |
316ea293 |
49 | // --- ANDOR component fields --- |
7fd59977 |
50 | |
51 | geometricRepresentationContext = new StepGeom_GeometricRepresentationContext(); |
52 | geometricRepresentationContext->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension); |
53 | |
316ea293 |
54 | // --- ANDOR component fields --- |
7fd59977 |
55 | |
56 | parametricRepresentationContext = new StepRepr_ParametricRepresentationContext(); |
57 | parametricRepresentationContext->Init(aContextIdentifier, aContextType); |
58 | } |
59 | |
60 | |
61 | void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetGeometricRepresentationContext(const Handle(StepGeom_GeometricRepresentationContext)& aGeometricRepresentationContext) |
62 | { |
63 | geometricRepresentationContext = aGeometricRepresentationContext; |
64 | } |
65 | |
66 | Handle(StepGeom_GeometricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::GeometricRepresentationContext() const |
67 | { |
68 | return geometricRepresentationContext; |
69 | } |
70 | |
71 | void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetParametricRepresentationContext(const Handle(StepRepr_ParametricRepresentationContext)& aParametricRepresentationContext) |
72 | { |
73 | parametricRepresentationContext = aParametricRepresentationContext; |
74 | } |
75 | |
76 | Handle(StepRepr_ParametricRepresentationContext) StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::ParametricRepresentationContext() const |
77 | { |
78 | return parametricRepresentationContext; |
79 | } |
80 | |
81 | //--- Specific Methods for AND classe field access --- |
82 | |
83 | |
84 | void StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::SetCoordinateSpaceDimension(const Standard_Integer aCoordinateSpaceDimension) |
85 | { |
86 | geometricRepresentationContext->SetCoordinateSpaceDimension(aCoordinateSpaceDimension); |
87 | } |
88 | |
89 | Standard_Integer StepGeom_GeometricRepresentationContextAndParametricRepresentationContext::CoordinateSpaceDimension() const |
90 | { |
91 | return geometricRepresentationContext->CoordinateSpaceDimension(); |
92 | } |