Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:49

0001 // Created on: 1993-01-11
0002 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESDraw_ViewsVisibleWithAttr_HeaderFile
0018 #define _IGESDraw_ViewsVisibleWithAttr_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <IGESData_ViewKindEntity.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <IGESData_LineFontEntity.hxx>
0027 #include <IGESGraph_Color.hxx>
0028 #include <IGESData_IGESEntity.hxx>
0029 class IGESData_LineFontEntity;
0030 class IGESGraph_Color;
0031 class IGESData_IGESEntity;
0032 
0033 //! defines IGESViewsVisibleWithAttr, Type <402>, Form <4>
0034 //! in package IGESDraw
0035 //!
0036 //! This class is extension of Class ViewsVisible. It is used
0037 //! for those entities that are visible in multiple views, but
0038 //! must have a different line font, color number, or
0039 //! line weight in each view.
0040 class IGESDraw_ViewsVisibleWithAttr : public IGESData_ViewKindEntity
0041 {
0042 
0043 public:
0044   Standard_EXPORT IGESDraw_ViewsVisibleWithAttr();
0045 
0046   //! This method is used to set fields of the class
0047   //! ViewsVisibleWithAttr
0048   //! - allViewEntities     : All View kind entities
0049   //! - allLineFonts        : All Line Font values or zero(0)
0050   //! - allLineDefinitions  : Line Font Definition
0051   //! (if Line Font value = 0)
0052   //! - allColorValues      : All Color values
0053   //! - allColorDefinitions : All Color Definition Entities
0054   //! - allLineWeights      : All Line Weight values
0055   //! - allDisplayEntities  : Entities which are member of
0056   //! this associativity
0057   //! raises exception if Lengths of allViewEntities, allLineFonts,
0058   //! allColorValues,allColorDefinitions, allLineWeights are not same
0059   Standard_EXPORT void Init(
0060     const occ::handle<NCollection_HArray1<occ::handle<IGESData_ViewKindEntity>>>& allViewEntities,
0061     const occ::handle<NCollection_HArray1<int>>&                                  allLineFonts,
0062     const occ::handle<NCollection_HArray1<occ::handle<IGESData_LineFontEntity>>>&
0063                                                                               allLineDefinitions,
0064     const occ::handle<NCollection_HArray1<int>>&                              allColorValues,
0065     const occ::handle<NCollection_HArray1<occ::handle<IGESGraph_Color>>>&     allColorDefinitions,
0066     const occ::handle<NCollection_HArray1<int>>&                              allLineWeights,
0067     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& allDisplayEntities);
0068 
0069   //! Changes only the list of Displayed Entities (Null allowed)
0070   Standard_EXPORT void InitImplied(
0071     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& allDisplayEntity);
0072 
0073   //! Returns False (for a complex view)
0074   Standard_EXPORT bool IsSingle() const override;
0075 
0076   //! returns the number of Views containing the view visible, line font,
0077   //! color number, and line weight information
0078   Standard_EXPORT int NbViews() const override;
0079 
0080   //! returns the number of entities which have this particular set of
0081   //! display characteristic, or zero if no Entities specified
0082   Standard_EXPORT int NbDisplayedEntities() const;
0083 
0084   //! returns the Index'th ViewKindEntity entity
0085   //! raises exception if Index <= 0 or Index > NbViews()
0086   Standard_EXPORT occ::handle<IGESData_ViewKindEntity> ViewItem(const int Index) const override;
0087 
0088   //! returns the Index'th Line font value or zero
0089   //! raises exception if Index <= 0 or Index > NbViews()
0090   Standard_EXPORT int LineFontValue(const int Index) const;
0091 
0092   //! returns True if the Index'th Line Font Definition is specified
0093   //! else returns False
0094   //! raises exception if Index <= 0 or Index > NbViews()
0095   Standard_EXPORT bool IsFontDefinition(const int Index) const;
0096 
0097   //! returns the Index'th Line Font Definition Entity or NULL(0)
0098   //! raises exception if Index <= 0 or Index > NbViews()
0099   Standard_EXPORT occ::handle<IGESData_LineFontEntity> FontDefinition(const int Index) const;
0100 
0101   //! returns the Index'th Color number value
0102   //! raises exception if Index <= 0 or Index > NbViews()
0103   Standard_EXPORT int ColorValue(const int Index) const;
0104 
0105   //! returns True if Index'th Color Definition is specified
0106   //! else returns False
0107   //! raises exception if Index <= 0 or Index > NbViews()
0108   Standard_EXPORT bool IsColorDefinition(const int Index) const;
0109 
0110   //! returns the Index'th Color Definition Entity
0111   //! raises exception if Index <= 0 or Index > NbViews()
0112   Standard_EXPORT occ::handle<IGESGraph_Color> ColorDefinition(const int Index) const;
0113 
0114   //! returns the Index'th Color Line Weight
0115   //! raises exception if Index <= 0 or Index > NbViews()
0116   Standard_EXPORT int LineWeightItem(const int Index) const;
0117 
0118   //! returns Index'th Display entity with this particular characteristics
0119   //! raises exception if Index <= 0 or Index > NbEntities()
0120   Standard_EXPORT occ::handle<IGESData_IGESEntity> DisplayedEntity(const int Index) const;
0121 
0122   DEFINE_STANDARD_RTTIEXT(IGESDraw_ViewsVisibleWithAttr, IGESData_ViewKindEntity)
0123 
0124 private:
0125   occ::handle<NCollection_HArray1<occ::handle<IGESData_ViewKindEntity>>> theViewEntities;
0126   occ::handle<NCollection_HArray1<int>>                                  theLineFonts;
0127   occ::handle<NCollection_HArray1<occ::handle<IGESData_LineFontEntity>>> theLineDefinitions;
0128   occ::handle<NCollection_HArray1<int>>                                  theColorValues;
0129   occ::handle<NCollection_HArray1<occ::handle<IGESGraph_Color>>>         theColorDefinitions;
0130   occ::handle<NCollection_HArray1<int>>                                  theLineWeights;
0131   occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>     theDisplayEntities;
0132 };
0133 
0134 #endif // _IGESDraw_ViewsVisibleWithAttr_HeaderFile