Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:17:55

0001 // Created on: 2015-07-07
0002 // Created by: Irina KRYLOVA
0003 // Copyright (c) 2015 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _StepDimTol_GeometricToleranceWithModifiers_HeaderFile
0017 #define _StepDimTol_GeometricToleranceWithModifiers_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Standard_Integer.hxx>
0022 #include <StepDimTol_GeometricTolerance.hxx>
0023 #include <StepDimTol_GeometricToleranceModifier.hxx>
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 
0027 class TCollection_HAsciiString;
0028 class StepDimTol_GeometricToleranceTarget;
0029 
0030 //! Representation of STEP entity GeometricToleranceWithModifiers
0031 class StepDimTol_GeometricToleranceWithModifiers : public StepDimTol_GeometricTolerance
0032 {
0033 
0034 public:
0035   //! Empty constructor
0036   Standard_EXPORT StepDimTol_GeometricToleranceWithModifiers();
0037 
0038   //! Initialize all fields (own and inherited)
0039   Standard_EXPORT void Init(
0040     const occ::handle<TCollection_HAsciiString>& theName,
0041     const occ::handle<TCollection_HAsciiString>& theDescription,
0042     const occ::handle<Standard_Transient>&       theMagnitude,
0043     const StepDimTol_GeometricToleranceTarget&   theTolerancedShapeAspect,
0044     const occ::handle<NCollection_HArray1<StepDimTol_GeometricToleranceModifier>>& theModifiers);
0045 
0046   //! Returns field Modifiers
0047   inline occ::handle<NCollection_HArray1<StepDimTol_GeometricToleranceModifier>> Modifiers() const
0048   {
0049     return myModifiers;
0050   }
0051 
0052   //! Set field Modifiers
0053   inline void SetModifiers(
0054     const occ::handle<NCollection_HArray1<StepDimTol_GeometricToleranceModifier>>& theModifiers)
0055   {
0056     myModifiers = theModifiers;
0057   }
0058 
0059   //! Returns number of modifiers
0060   inline int NbModifiers() const { return (myModifiers.IsNull() ? 0 : myModifiers->Length()); }
0061 
0062   //! Returns modifier with the given number
0063   inline StepDimTol_GeometricToleranceModifier ModifierValue(const int theNum) const
0064   {
0065     return myModifiers->Value(theNum);
0066   }
0067 
0068   //! Sets modifier with given number
0069   inline void SetModifierValue(const int                                   theNum,
0070                                const StepDimTol_GeometricToleranceModifier theItem)
0071   {
0072     myModifiers->SetValue(theNum, theItem);
0073   }
0074   DEFINE_STANDARD_RTTIEXT(StepDimTol_GeometricToleranceWithModifiers, StepDimTol_GeometricTolerance)
0075 
0076 private:
0077   occ::handle<NCollection_HArray1<StepDimTol_GeometricToleranceModifier>> myModifiers;
0078 };
0079 #endif // _StepDimTol_GeometricToleranceWithModifiers_HeaderFile