Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:18:12

0001 // Created on: 2015-07-13
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_ToleranceZone_HeaderFile
0017 #define _StepDimTol_ToleranceZone_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <StepRepr_ShapeAspect.hxx>
0022 #include <Standard_Integer.hxx>
0023 #include <StepDimTol_HArray1OfToleranceZoneTarget.hxx>
0024 #include <StepDimTol_ToleranceZoneForm.hxx>
0025 #include <StepDimTol_ToleranceZoneTarget.hxx>
0026 
0027 class TCollection_HAsciiString;
0028 
0029 // Avoid possible conflict with SetForm macro defined by windows.h
0030 #ifdef SetForm
0031   #undef SetForm
0032 #endif
0033 
0034 class StepDimTol_ToleranceZone;
0035 DEFINE_STANDARD_HANDLE(StepDimTol_ToleranceZone, StepRepr_ShapeAspect)
0036 
0037 //! Representation of STEP entity ToleranceZone
0038 class StepDimTol_ToleranceZone : public StepRepr_ShapeAspect
0039 {
0040 
0041 public:
0042   //! Empty constructor
0043   Standard_EXPORT StepDimTol_ToleranceZone();
0044 
0045   //! Initialize all fields (own and inherited)
0046   Standard_EXPORT void Init(
0047     const Handle(TCollection_HAsciiString)&                theName,
0048     const Handle(TCollection_HAsciiString)&                theDescription,
0049     const Handle(StepRepr_ProductDefinitionShape)&         theOfShape,
0050     const StepData_Logical                                 theProductDefinitional,
0051     const Handle(StepDimTol_HArray1OfToleranceZoneTarget)& theDefiningTolerance,
0052     const Handle(StepDimTol_ToleranceZoneForm)&            theForm);
0053 
0054   //! Returns field DefiningTolerance
0055   inline Handle(StepDimTol_HArray1OfToleranceZoneTarget) DefiningTolerance() const
0056   {
0057     return myDefiningTolerance;
0058   }
0059 
0060   //! Set field DefiningTolerance
0061   inline void SetDefiningTolerance(
0062     const Handle(StepDimTol_HArray1OfToleranceZoneTarget)& theDefiningTolerance)
0063   {
0064     myDefiningTolerance = theDefiningTolerance;
0065   }
0066 
0067   //! Returns number of Defining Tolerances
0068   inline Standard_Integer NbDefiningTolerances() const
0069   {
0070     return (myDefiningTolerance.IsNull() ? 0 : myDefiningTolerance->Length());
0071   }
0072 
0073   //! Returns Defining Tolerance with the given number
0074   inline StepDimTol_ToleranceZoneTarget DefiningToleranceValue(const Standard_Integer theNum) const
0075   {
0076     return myDefiningTolerance->Value(theNum);
0077   }
0078 
0079   //! Sets Defining Tolerance with given number
0080   inline void SetDefiningToleranceValue(const Standard_Integer                theNum,
0081                                         const StepDimTol_ToleranceZoneTarget& theItem)
0082   {
0083     myDefiningTolerance->SetValue(theNum, theItem);
0084   }
0085 
0086   //! Returns field Form
0087   inline Handle(StepDimTol_ToleranceZoneForm) Form() { return myForm; }
0088 
0089   //! Set field Form
0090   inline void SetForm(const Handle(StepDimTol_ToleranceZoneForm)& theForm) { myForm = theForm; }
0091 
0092   DEFINE_STANDARD_RTTIEXT(StepDimTol_ToleranceZone, StepRepr_ShapeAspect)
0093 
0094 private:
0095   Handle(StepDimTol_HArray1OfToleranceZoneTarget) myDefiningTolerance;
0096   Handle(StepDimTol_ToleranceZoneForm)            myForm;
0097 };
0098 #endif // _StepDimTol_ToleranceZone_HeaderFile