28a73c1f |
1 | // Created on: 2015-07-07 |
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_GeometricToleranceWithModifiers_HeaderFile |
17 | #define _StepDimTol_GeometricToleranceWithModifiers_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Type.hxx> |
21 | |
22 | #include <Standard_Integer.hxx> |
23 | #include <StepDimTol_GeometricTolerance.hxx> |
24 | #include <StepDimTol_GeometricToleranceModifier.hxx> |
25 | #include <StepDimTol_HArray1OfGeometricToleranceModifier.hxx> |
26 | |
27 | class StepDimTol_HArray1OfGeometricToleranceModifier; |
28 | class TCollection_HAsciiString; |
29 | class StepBasic_MeasureWithUnit; |
30 | class StepDimTol_GeometricToleranceTarget; |
31 | |
32 | class StepDimTol_GeometricToleranceWithModifiers; |
33 | DEFINE_STANDARD_HANDLE(StepDimTol_GeometricToleranceWithModifiers, StepDimTol_GeometricTolerance) |
34 | //! Representation of STEP entity GeometricToleranceWithModifiers |
35 | class StepDimTol_GeometricToleranceWithModifiers : public StepDimTol_GeometricTolerance |
36 | { |
37 | |
38 | public: |
39 | |
40 | //! Empty constructor |
41 | Standard_EXPORT StepDimTol_GeometricToleranceWithModifiers(); |
42 | |
43 | //! Initialize all fields (own and inherited) |
44 | Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, |
45 | const Handle(TCollection_HAsciiString)& theDescription, |
46 | const Handle(StepBasic_MeasureWithUnit)& theMagnitude, |
47 | const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, |
48 | const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers) ; |
49 | |
50 | //! Returns field Modifiers |
51 | inline Handle(StepDimTol_HArray1OfGeometricToleranceModifier) Modifiers () const |
52 | { |
2f220b97 |
53 | return myModifiers; |
28a73c1f |
54 | } |
55 | |
56 | //! Set field Modifiers |
57 | inline void SetModifiers (const Handle(StepDimTol_HArray1OfGeometricToleranceModifier) &theModifiers) |
58 | { |
2f220b97 |
59 | myModifiers = theModifiers; |
28a73c1f |
60 | } |
61 | |
62 | //! Returns number of modifiers |
63 | inline Standard_Integer NbModifiers () const |
64 | { |
2f220b97 |
65 | return (myModifiers.IsNull() ? 0 : myModifiers->Length()); |
28a73c1f |
66 | } |
67 | |
68 | //! Returns modifier with the given number |
2f220b97 |
69 | inline StepDimTol_GeometricToleranceModifier ModifierValue(const Standard_Integer theNum) const |
28a73c1f |
70 | { |
2f220b97 |
71 | return myModifiers->Value(theNum); |
28a73c1f |
72 | } |
73 | |
74 | //! Sets modifier with given number |
2f220b97 |
75 | inline void SetModifierValue(const Standard_Integer theNum, const StepDimTol_GeometricToleranceModifier theItem) |
28a73c1f |
76 | { |
2f220b97 |
77 | myModifiers->SetValue (theNum, theItem); |
28a73c1f |
78 | } |
92efcf78 |
79 | DEFINE_STANDARD_RTTIEXT(StepDimTol_GeometricToleranceWithModifiers,StepDimTol_GeometricTolerance) |
28a73c1f |
80 | |
81 | private: |
2f220b97 |
82 | Handle(StepDimTol_HArray1OfGeometricToleranceModifier) myModifiers; |
28a73c1f |
83 | }; |
84 | #endif // _StepDimTol_GeometricToleranceWithModifiers_HeaderFile |