Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:07

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_HArray1OfDatumReferenceModifier.hxx>
0025 
0026 class StepDimTol_GeneralDatumReference;
0027 DEFINE_STANDARD_HANDLE(StepDimTol_GeneralDatumReference, StepRepr_ShapeAspect)
0028 //! Representation of STEP entity GeneralDatumReference
0029 class StepDimTol_GeneralDatumReference : public StepRepr_ShapeAspect
0030 {
0031 
0032 public:
0033   
0034   //! Empty constructor
0035   Standard_EXPORT StepDimTol_GeneralDatumReference();
0036   
0037   //! Initialize all fields (own and inherited)
0038   Standard_EXPORT   void Init (const Handle(TCollection_HAsciiString)& theName,
0039                                const Handle(TCollection_HAsciiString)& theDescription,
0040                                const Handle(StepRepr_ProductDefinitionShape)& theOfShape,
0041                                const StepData_Logical theProductDefinitional,
0042                                const StepDimTol_DatumOrCommonDatum& theBase,
0043                                const Standard_Boolean theHasModifiers,
0044                                const Handle(StepDimTol_HArray1OfDatumReferenceModifier)& theModifiers);
0045   
0046   //! Returns field Base
0047   inline StepDimTol_DatumOrCommonDatum Base()
0048   {
0049     return myBase;
0050   }
0051   
0052   //! Set field Base
0053   inline void SetBase(const StepDimTol_DatumOrCommonDatum& theBase)
0054   {
0055     myBase = theBase;
0056   }
0057   
0058   //! Indicates is field Modifiers exist
0059   inline Standard_Boolean HasModifiers() const
0060   {
0061     return !(myModifiers.IsNull() || myModifiers->Length() == 0);
0062   }
0063   
0064   //! Returns field Modifiers
0065   inline Handle(StepDimTol_HArray1OfDatumReferenceModifier) Modifiers()
0066   {
0067     return myModifiers;
0068   }
0069   
0070   //! Set field Modifiers
0071   inline void SetModifiers(const Handle(StepDimTol_HArray1OfDatumReferenceModifier)& theModifiers)
0072   {
0073     myModifiers = theModifiers;
0074   }
0075   
0076   //! Returns number of Modifiers
0077   inline Standard_Integer NbModifiers () const
0078   {  
0079     return (myModifiers.IsNull() ? 0 : myModifiers->Length());
0080   }
0081   
0082   //! Returns Modifiers with the given number
0083   inline StepDimTol_DatumReferenceModifier ModifiersValue(const Standard_Integer theNum) const
0084   {  
0085     return myModifiers->Value(theNum);
0086   }
0087   
0088   //! Sets Modifiers with given number
0089   inline void ModifiersValue(const Standard_Integer theNum, const StepDimTol_DatumReferenceModifier& theItem)
0090   {  
0091     myModifiers->SetValue (theNum, theItem);
0092   }
0093   
0094   DEFINE_STANDARD_RTTIEXT(StepDimTol_GeneralDatumReference,StepRepr_ShapeAspect)
0095 
0096 private: 
0097   StepDimTol_DatumOrCommonDatum myBase;
0098   Handle(StepDimTol_HArray1OfDatumReferenceModifier) myModifiers;
0099 };
0100 #endif // _StepDimTol_GeneralDatumReference_HeaderFile