28a73c1f |
1 | // Created on: 2015-07-13 |
2 | // Created by: Irina KRYLOVA |
3 | // Copyright (c) 2015 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
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 |
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. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _StepDimTol_ToleranceZone_HeaderFile |
17 | #define _StepDimTol_ToleranceZone_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Type.hxx> |
21 | |
22 | #include <StepRepr_ShapeAspect.hxx> |
23 | #include <Standard_Integer.hxx> |
24 | #include <StepDimTol_HArray1OfToleranceZoneTarget.hxx> |
25 | #include <StepDimTol_ToleranceZoneForm.hxx> |
26 | #include <StepDimTol_ToleranceZoneTarget.hxx> |
27 | |
28 | class StepDimTol_HArray1OfToleranceZoneTarget; |
29 | class TCollection_HAsciiString; |
30 | class StepBasic_MeasureWithUnit; |
31 | |
896faa72 |
32 | // Avoid possible conflict with SetForm macro defined by windows.h |
33 | #ifdef SetForm |
34 | #undef SetForm |
35 | #endif |
36 | |
28a73c1f |
37 | class StepDimTol_ToleranceZone; |
38 | DEFINE_STANDARD_HANDLE(StepDimTol_ToleranceZone, StepRepr_ShapeAspect) |
39 | //! Representation of STEP entity ToleranceZone |
40 | class StepDimTol_ToleranceZone : public StepRepr_ShapeAspect |
41 | { |
42 | |
43 | public: |
44 | |
45 | //! Empty constructor |
46 | Standard_EXPORT StepDimTol_ToleranceZone(); |
47 | |
48 | //! Initialize all fields (own and inherited) |
49 | Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, |
50 | const Handle(TCollection_HAsciiString)& theDescription, |
51 | const Handle(StepRepr_ProductDefinitionShape)& theOfShape, |
52 | const StepData_Logical theProductDefinitional, |
53 | const Handle(StepDimTol_HArray1OfToleranceZoneTarget)& theDefiningTolerance, |
54 | const Handle(StepDimTol_ToleranceZoneForm)& theForm); |
55 | |
56 | //! Returns field DefiningTolerance |
57 | inline Handle(StepDimTol_HArray1OfToleranceZoneTarget) DefiningTolerance () const |
58 | { |
2f220b97 |
59 | return myDefiningTolerance; |
28a73c1f |
60 | } |
61 | |
62 | //! Set field DefiningTolerance |
5df609e7 |
63 | inline void SetDefiningTolerance (const Handle(StepDimTol_HArray1OfToleranceZoneTarget) &theDefiningTolerance) |
28a73c1f |
64 | { |
2f220b97 |
65 | myDefiningTolerance = theDefiningTolerance; |
28a73c1f |
66 | } |
67 | |
68 | //! Returns number of Defining Tolerances |
69 | inline Standard_Integer NbDefiningTolerances () const |
70 | { |
2f220b97 |
71 | return (myDefiningTolerance.IsNull() ? 0 : myDefiningTolerance->Length()); |
28a73c1f |
72 | } |
73 | |
74 | //! Returns Defining Tolerance with the given number |
2f220b97 |
75 | inline StepDimTol_ToleranceZoneTarget DefiningToleranceValue(const Standard_Integer theNum) const |
28a73c1f |
76 | { |
2f220b97 |
77 | return myDefiningTolerance->Value(theNum); |
28a73c1f |
78 | } |
79 | |
80 | //! Sets Defining Tolerance with given number |
2f220b97 |
81 | inline void SetDefiningToleranceValue(const Standard_Integer theNum, const StepDimTol_ToleranceZoneTarget& theItem) |
28a73c1f |
82 | { |
2f220b97 |
83 | myDefiningTolerance->SetValue (theNum, theItem); |
28a73c1f |
84 | } |
85 | |
86 | //! Returns field Form |
87 | inline Handle(StepDimTol_ToleranceZoneForm) Form() |
88 | { |
2f220b97 |
89 | return myForm; |
28a73c1f |
90 | } |
91 | |
92 | //! Set field Form |
93 | inline void SetForm(const Handle(StepDimTol_ToleranceZoneForm)& theForm) |
94 | { |
2f220b97 |
95 | myForm = theForm; |
28a73c1f |
96 | } |
97 | |
92efcf78 |
98 | DEFINE_STANDARD_RTTIEXT(StepDimTol_ToleranceZone,StepRepr_ShapeAspect) |
28a73c1f |
99 | |
100 | private: |
2f220b97 |
101 | Handle(StepDimTol_HArray1OfToleranceZoneTarget) myDefiningTolerance; |
102 | Handle(StepDimTol_ToleranceZoneForm) myForm; |
28a73c1f |
103 | }; |
104 | #endif // _StepDimTol_ToleranceZone_HeaderFile |