Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:18:02

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_ViewsVisible_HeaderFile
0018 #define _IGESDraw_ViewsVisible_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <IGESData_ViewKindEntity.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <IGESData_IGESEntity.hxx>
0026 #include <Standard_Integer.hxx>
0027 class IGESData_IGESEntity;
0028 
0029 //! Defines IGESViewsVisible, Type <402>, Form <3>
0030 //! in package IGESDraw
0031 //!
0032 //! If an entity is to be displayed in more than one views,
0033 //! this class instance is used, which contains the Visible
0034 //! views and the associated entity Displays.
0035 class IGESDraw_ViewsVisible : public IGESData_ViewKindEntity
0036 {
0037 
0038 public:
0039   Standard_EXPORT IGESDraw_ViewsVisible();
0040 
0041   //! This method is used to set the fields of the class
0042   //! ViewsVisible
0043   //! - allViewEntities  : All View kind entities
0044   //! - allDisplayEntity : All entities whose display is specified
0045   Standard_EXPORT void Init(
0046     const occ::handle<NCollection_HArray1<occ::handle<IGESData_ViewKindEntity>>>& allViewEntities,
0047     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>&     allDisplayEntity);
0048 
0049   //! Changes only the list of Displayed Entities (Null allowed)
0050   Standard_EXPORT void InitImplied(
0051     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& allDisplayEntity);
0052 
0053   //! Returns False (for a complex view)
0054   Standard_EXPORT bool IsSingle() const override;
0055 
0056   //! returns the Number of views visible
0057   Standard_EXPORT int NbViews() const override;
0058 
0059   //! returns the number of entities displayed in the Views or zero if
0060   //! no Entities specified in these Views
0061   Standard_EXPORT int NbDisplayedEntities() const;
0062 
0063   //! returns the Index'th ViewKindEntity Entity
0064   //! raises exception if Index <= 0 or Index > NbViewsVisible()
0065   Standard_EXPORT occ::handle<IGESData_ViewKindEntity> ViewItem(const int Index) const override;
0066 
0067   //! returns the Index'th entity whose display is being specified by
0068   //! this associativity instance
0069   //! raises exception if Index <= 0 or Index > NbEntityDisplayed()
0070   Standard_EXPORT occ::handle<IGESData_IGESEntity> DisplayedEntity(const int Index) const;
0071 
0072   DEFINE_STANDARD_RTTIEXT(IGESDraw_ViewsVisible, IGESData_ViewKindEntity)
0073 
0074 private:
0075   occ::handle<NCollection_HArray1<occ::handle<IGESData_ViewKindEntity>>> theViewEntities;
0076   occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>     theDisplayEntity;
0077 };
0078 
0079 #endif // _IGESDraw_ViewsVisible_HeaderFile