Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:18:40

0001 // Created on: 2015-07-16
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_GeneralDatumReference_HeaderFile
0017 #define _StepDimTol_GeneralDatumReference_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Standard_Integer.hxx>
0022 #include <StepRepr_ShapeAspect.hxx>
0023 #include <StepDimTol_DatumOrCommonDatum.hxx>
0024 #include <StepDimTol_DatumReferenceModifier.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <NCollection_HArray1.hxx>
0027 
0028 //! Representation of STEP entity GeneralDatumReference
0029 class StepDimTol_GeneralDatumReference : public StepRepr_ShapeAspect
0030 {
0031 
0032 public:
0033   //! Empty constructor
0034   Standard_EXPORT StepDimTol_GeneralDatumReference();
0035 
0036   //! Initialize all fields (own and inherited)
0037   Standard_EXPORT void Init(
0038     const occ::handle<TCollection_HAsciiString>&        theName,
0039     const occ::handle<TCollection_HAsciiString>&        theDescription,
0040     const occ::handle<StepRepr_ProductDefinitionShape>& theOfShape,
0041     const StepData_Logical                              theProductDefinitional,
0042     const StepDimTol_DatumOrCommonDatum&                theBase,
0043     const bool                                          theHasModifiers,
0044     const occ::handle<NCollection_HArray1<StepDimTol_DatumReferenceModifier>>& theModifiers);
0045 
0046   //! Returns field Base
0047   inline StepDimTol_DatumOrCommonDatum Base() { return myBase; }
0048 
0049   //! Set field Base
0050   inline void SetBase(const StepDimTol_DatumOrCommonDatum& theBase) { myBase = theBase; }
0051 
0052   //! Indicates is field Modifiers exist
0053   inline bool HasModifiers() const { return !myModifiers.IsNull() && myModifiers->Length() != 0; }
0054 
0055   //! Returns field Modifiers
0056   inline occ::handle<NCollection_HArray1<StepDimTol_DatumReferenceModifier>> Modifiers()
0057   {
0058     return myModifiers;
0059   }
0060 
0061   //! Set field Modifiers
0062   inline void SetModifiers(
0063     const occ::handle<NCollection_HArray1<StepDimTol_DatumReferenceModifier>>& theModifiers)
0064   {
0065     myModifiers = theModifiers;
0066   }
0067 
0068   //! Returns number of Modifiers
0069   inline int NbModifiers() const { return (myModifiers.IsNull() ? 0 : myModifiers->Length()); }
0070 
0071   //! Returns Modifiers with the given number
0072   inline StepDimTol_DatumReferenceModifier ModifiersValue(const int theNum) const
0073   {
0074     return myModifiers->Value(theNum);
0075   }
0076 
0077   //! Sets Modifiers with given number
0078   inline void ModifiersValue(const int theNum, const StepDimTol_DatumReferenceModifier& theItem)
0079   {
0080     myModifiers->SetValue(theNum, theItem);
0081   }
0082 
0083   DEFINE_STANDARD_RTTIEXT(StepDimTol_GeneralDatumReference, StepRepr_ShapeAspect)
0084 
0085 private:
0086   StepDimTol_DatumOrCommonDatum                                       myBase;
0087   occ::handle<NCollection_HArray1<StepDimTol_DatumReferenceModifier>> myModifiers;
0088 };
0089 #endif // _StepDimTol_GeneralDatumReference_HeaderFile