Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-22 09:35:02

0001 // Created on: 2015-07-10
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 _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile
0017 #define _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Standard_Transient.hxx>
0022 #include <StepAP242_ItemIdentifiedRepresentationUsageDefinition.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <StepRepr_RepresentationItem.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <NCollection_HArray1.hxx>
0027 
0028 class TCollection_HAsciiString;
0029 class StepRepr_Representation;
0030 class StepRepr_RepresentationItem;
0031 
0032 class StepAP242_ItemIdentifiedRepresentationUsage : public Standard_Transient
0033 {
0034 
0035 public:
0036   //! Returns a ItemIdentifiedRepresentationUsage
0037   Standard_EXPORT StepAP242_ItemIdentifiedRepresentationUsage();
0038 
0039   //! Init all fields own and inherited
0040   Standard_EXPORT void Init(
0041     const occ::handle<TCollection_HAsciiString>&                 theName,
0042     const occ::handle<TCollection_HAsciiString>&                 theDescription,
0043     const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition,
0044     const occ::handle<StepRepr_Representation>&                  theUsedRepresentation,
0045     const occ::handle<NCollection_HArray1<occ::handle<StepRepr_RepresentationItem>>>&
0046       theIdentifiedItem);
0047 
0048   //! Set field Name
0049   inline void SetName(const occ::handle<TCollection_HAsciiString>& theName) { name = theName; }
0050 
0051   //! Returns field Name
0052   inline occ::handle<TCollection_HAsciiString> Name() const { return name; }
0053 
0054   //! Set field Description
0055   inline void SetDescription(const occ::handle<TCollection_HAsciiString>& theDescription)
0056   {
0057     description = theDescription;
0058   }
0059 
0060   //! Returns field Description
0061   inline occ::handle<TCollection_HAsciiString> Description() const { return description; }
0062 
0063   //! Set field Definition
0064   inline void SetDefinition(
0065     const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition)
0066   {
0067     definition = theDefinition;
0068   }
0069 
0070   //! Returns field Definition
0071   inline StepAP242_ItemIdentifiedRepresentationUsageDefinition Definition() const
0072   {
0073     return definition;
0074   }
0075 
0076   //! Set field UsedRepresentation
0077   inline void SetUsedRepresentation(
0078     const occ::handle<StepRepr_Representation>& theUsedRepresentation)
0079   {
0080     usedRepresentation = theUsedRepresentation;
0081   }
0082 
0083   //! Returns field UsedRepresentation
0084   inline occ::handle<StepRepr_Representation> UsedRepresentation() const
0085   {
0086     return usedRepresentation;
0087   }
0088 
0089   //! Returns field IdentifiedItem
0090   inline occ::handle<NCollection_HArray1<occ::handle<StepRepr_RepresentationItem>>> IdentifiedItem()
0091     const
0092   {
0093     return identifiedItem;
0094   }
0095 
0096   //! Returns number of identified items
0097   inline int NbIdentifiedItem() const
0098   {
0099     return (identifiedItem.IsNull() ? 0 : identifiedItem->Length());
0100   }
0101 
0102   //! Set field IdentifiedItem
0103   inline void SetIdentifiedItem(
0104     const occ::handle<NCollection_HArray1<occ::handle<StepRepr_RepresentationItem>>>&
0105       theIdentifiedItem)
0106   {
0107     identifiedItem = theIdentifiedItem;
0108   }
0109 
0110   //! Returns identified item with given number
0111   inline occ::handle<StepRepr_RepresentationItem> IdentifiedItemValue(const int num) const
0112   {
0113     return identifiedItem->Value(num);
0114   }
0115 
0116   //! Set identified item with given number
0117   inline void SetIdentifiedItemValue(const int                                       num,
0118                                      const occ::handle<StepRepr_RepresentationItem>& theItem)
0119   {
0120     identifiedItem->SetValue(num, theItem);
0121   }
0122 
0123   DEFINE_STANDARD_RTTIEXT(StepAP242_ItemIdentifiedRepresentationUsage, Standard_Transient)
0124 
0125 private:
0126   occ::handle<TCollection_HAsciiString>                                      name;
0127   occ::handle<TCollection_HAsciiString>                                      description;
0128   StepAP242_ItemIdentifiedRepresentationUsageDefinition                      definition;
0129   occ::handle<StepRepr_Representation>                                       usedRepresentation;
0130   occ::handle<NCollection_HArray1<occ::handle<StepRepr_RepresentationItem>>> identifiedItem;
0131 };
0132 #endif // _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile