0026720: Coding, STEP - non-conformant names of class fields
[occt.git] / src / StepDimTol / StepDimTol_GeometricToleranceWithDatumReference.cxx
CommitLineData
b311480e 1// Created on: 2003-06-04
2// Created by: Galina KULIKOVA
973c2be1 3// Copyright (c) 2003-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
7fd59977 16// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
7fd59977 17
42cf5bc1 18#include <Standard_Type.hxx>
19#include <StepBasic_MeasureWithUnit.hxx>
28a73c1f 20#include <StepDimTol_GeometricToleranceTarget.hxx>
42cf5bc1 21#include <StepDimTol_GeometricToleranceWithDatumReference.hxx>
22#include <StepRepr_ShapeAspect.hxx>
23#include <TCollection_HAsciiString.hxx>
7fd59977 24
25//=======================================================================
26//function : StepDimTol_GeometricToleranceWithDatumReference
27//purpose :
28//=======================================================================
7fd59977 29StepDimTol_GeometricToleranceWithDatumReference::StepDimTol_GeometricToleranceWithDatumReference ()
30{
31}
32
33//=======================================================================
34//function : Init
35//purpose :
36//=======================================================================
37
2f220b97 38void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name,
39 const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description,
40 const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude,
41 const Handle(StepRepr_ShapeAspect) &theGeometricTolerance_TolerancedShapeAspect,
42 const Handle(StepDimTol_HArray1OfDatumReference) &theDatumSystem)
7fd59977 43{
2f220b97 44 StepDimTol_GeometricTolerance::Init(theGeometricTolerance_Name,
45 theGeometricTolerance_Description,
46 theGeometricTolerance_Magnitude,
47 theGeometricTolerance_TolerancedShapeAspect);
7fd59977 48
2f220b97 49 myDatumSystem = new StepDimTol_HArray1OfDatumSystemOrReference(theDatumSystem->Lower(), theDatumSystem->Upper());
28a73c1f 50 StepDimTol_DatumSystemOrReference anAux;
2f220b97 51 for (Standard_Integer i = theDatumSystem->Lower(); i <= theDatumSystem->Upper(); i++) {
52 anAux.SetValue(theDatumSystem->Value(i));
53 myDatumSystem->SetValue(i, anAux);
28a73c1f 54 }
55}
56
57//=======================================================================
58//function : Init
59//purpose :
60//=======================================================================
61
2f220b97 62void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name,
63 const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description,
64 const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude,
65 const StepDimTol_GeometricToleranceTarget &theGeometricTolerance_TolerancedShapeAspect,
66 const Handle(StepDimTol_HArray1OfDatumSystemOrReference) &theDatumSystem)
28a73c1f 67{
2f220b97 68 StepDimTol_GeometricTolerance::Init(theGeometricTolerance_Name,
69 theGeometricTolerance_Description,
70 theGeometricTolerance_Magnitude,
71 theGeometricTolerance_TolerancedShapeAspect);
28a73c1f 72
2f220b97 73 myDatumSystem = theDatumSystem;
7fd59977 74}
75
76//=======================================================================
77//function : DatumSystem
78//purpose :
79//=======================================================================
80
81Handle(StepDimTol_HArray1OfDatumReference) StepDimTol_GeometricToleranceWithDatumReference::DatumSystem () const
28a73c1f 82{
83 Handle(StepDimTol_HArray1OfDatumReference) aDatumSystem;
2f220b97 84 aDatumSystem = new StepDimTol_HArray1OfDatumReference(myDatumSystem->Lower(), myDatumSystem->Upper());
28a73c1f 85 for (Standard_Integer i = aDatumSystem->Lower(); i <= aDatumSystem->Upper(); i++) {
2f220b97 86 aDatumSystem->SetValue(i, myDatumSystem->Value(i).DatumReference());
28a73c1f 87 }
88 return aDatumSystem;
89}
90
91//=======================================================================
92//function : DatumSystemAP242
93//purpose :
94//=======================================================================
95
96Handle(StepDimTol_HArray1OfDatumSystemOrReference) StepDimTol_GeometricToleranceWithDatumReference::DatumSystemAP242 () const
7fd59977 97{
2f220b97 98 return myDatumSystem;
7fd59977 99}
100
101//=======================================================================
102//function : SetDatumSystem
103//purpose :
104//=======================================================================
105
2f220b97 106void StepDimTol_GeometricToleranceWithDatumReference::SetDatumSystem (const Handle(StepDimTol_HArray1OfDatumReference) &theDatumSystem)
28a73c1f 107{
2f220b97 108 myDatumSystem = new StepDimTol_HArray1OfDatumSystemOrReference(theDatumSystem->Lower(), theDatumSystem->Upper());
28a73c1f 109 StepDimTol_DatumSystemOrReference anAux;
2f220b97 110 for (Standard_Integer i = theDatumSystem->Lower(); i <= theDatumSystem->Upper(); i++) {
111 anAux.SetValue(theDatumSystem->Value(i));
112 myDatumSystem->SetValue(i, anAux);
28a73c1f 113 }
114}
115
116//=======================================================================
117//function : SetDatumSystem
118//purpose :
119//=======================================================================
120
2f220b97 121void StepDimTol_GeometricToleranceWithDatumReference::SetDatumSystem (const Handle(StepDimTol_HArray1OfDatumSystemOrReference) &theDatumSystem)
7fd59977 122{
2f220b97 123 myDatumSystem = theDatumSystem;
7fd59977 124}