Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:00

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 <IGESDraw_HArray1OfViewKindEntity.hxx>
0023 #include <TColStd_HArray1OfInteger.hxx>
0024 #include <IGESBasic_HArray1OfLineFontEntity.hxx>
0025 #include <IGESGraph_HArray1OfColor.hxx>
0026 #include <IGESData_HArray1OfIGESEntity.hxx>
0027 #include <IGESData_ViewKindEntity.hxx>
0028 #include <Standard_Integer.hxx>
0029 class IGESData_LineFontEntity;
0030 class IGESGraph_Color;
0031 class IGESData_IGESEntity;
0032 
0033 
0034 class IGESDraw_ViewsVisibleWithAttr;
0035 DEFINE_STANDARD_HANDLE(IGESDraw_ViewsVisibleWithAttr, IGESData_ViewKindEntity)
0036 
0037 //! defines IGESViewsVisibleWithAttr, Type <402>, Form <4>
0038 //! in package IGESDraw
0039 //!
0040 //! This class is extension of Class ViewsVisible.  It is used
0041 //! for those entities that are visible in multiple views, but
0042 //! must have a different line font, color number, or
0043 //! line weight in each view.
0044 class IGESDraw_ViewsVisibleWithAttr : public IGESData_ViewKindEntity
0045 {
0046 
0047 public:
0048 
0049   
0050   Standard_EXPORT IGESDraw_ViewsVisibleWithAttr();
0051   
0052   //! This method is used to set fields of the class
0053   //! ViewsVisibleWithAttr
0054   //! - allViewEntities     : All View kind entities
0055   //! - allLineFonts        : All Line Font values or zero(0)
0056   //! - allLineDefinitions  : Line Font Definition
0057   //! (if Line Font value = 0)
0058   //! - allColorValues      : All Color values
0059   //! - allColorDefinitions : All Color Definition Entities
0060   //! - allLineWeights      : All Line Weight values
0061   //! - allDisplayEntities  : Entities which are member of
0062   //! this associativity
0063   //! raises exception if Lengths of allViewEntities, allLineFonts,
0064   //! allColorValues,allColorDefinitions, allLineWeights are not same
0065   Standard_EXPORT void Init (const Handle(IGESDraw_HArray1OfViewKindEntity)& allViewEntities, const Handle(TColStd_HArray1OfInteger)& allLineFonts, const Handle(IGESBasic_HArray1OfLineFontEntity)& allLineDefinitions, const Handle(TColStd_HArray1OfInteger)& allColorValues, const Handle(IGESGraph_HArray1OfColor)& allColorDefinitions, const Handle(TColStd_HArray1OfInteger)& allLineWeights, const Handle(IGESData_HArray1OfIGESEntity)& allDisplayEntities);
0066   
0067   //! Changes only the list of Displayed Entities (Null allowed)
0068   Standard_EXPORT void InitImplied (const Handle(IGESData_HArray1OfIGESEntity)& allDisplayEntity);
0069   
0070   //! Returns False (for a complex view)
0071   Standard_EXPORT Standard_Boolean IsSingle() const Standard_OVERRIDE;
0072   
0073   //! returns the number of Views containing the view visible, line font,
0074   //! color number, and line weight information
0075   Standard_EXPORT Standard_Integer NbViews() const Standard_OVERRIDE;
0076   
0077   //! returns the number of entities which have this particular set of
0078   //! display characteristic, or zero if no Entities specified
0079   Standard_EXPORT Standard_Integer NbDisplayedEntities() const;
0080   
0081   //! returns the Index'th ViewKindEntity entity
0082   //! raises exception if Index <= 0 or Index > NbViews()
0083   Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer Index) const Standard_OVERRIDE;
0084   
0085   //! returns the Index'th Line font value or zero
0086   //! raises exception if Index <= 0 or Index > NbViews()
0087   Standard_EXPORT Standard_Integer LineFontValue (const Standard_Integer Index) const;
0088   
0089   //! returns True if the Index'th Line Font Definition is specified
0090   //! else returns False
0091   //! raises exception if Index <= 0 or Index > NbViews()
0092   Standard_EXPORT Standard_Boolean IsFontDefinition (const Standard_Integer Index) const;
0093   
0094   //! returns the Index'th Line Font Definition Entity or NULL(0)
0095   //! raises exception if Index <= 0 or Index > NbViews()
0096   Standard_EXPORT Handle(IGESData_LineFontEntity) FontDefinition (const Standard_Integer Index) const;
0097   
0098   //! returns the Index'th Color number value
0099   //! raises exception if Index <= 0 or Index > NbViews()
0100   Standard_EXPORT Standard_Integer ColorValue (const Standard_Integer Index) const;
0101   
0102   //! returns True if Index'th Color Definition is specified
0103   //! else returns False
0104   //! raises exception if Index <= 0 or Index > NbViews()
0105   Standard_EXPORT Standard_Boolean IsColorDefinition (const Standard_Integer Index) const;
0106   
0107   //! returns the Index'th Color Definition Entity
0108   //! raises exception if Index <= 0 or Index > NbViews()
0109   Standard_EXPORT Handle(IGESGraph_Color) ColorDefinition (const Standard_Integer Index) const;
0110   
0111   //! returns the Index'th Color Line Weight
0112   //! raises exception if Index <= 0 or Index > NbViews()
0113   Standard_EXPORT Standard_Integer LineWeightItem (const Standard_Integer Index) const;
0114   
0115   //! returns Index'th Display entity with this particular characteristics
0116   //! raises exception if Index  <= 0 or Index > NbEntities()
0117   Standard_EXPORT Handle(IGESData_IGESEntity) DisplayedEntity (const Standard_Integer Index) const;
0118 
0119 
0120 
0121 
0122   DEFINE_STANDARD_RTTIEXT(IGESDraw_ViewsVisibleWithAttr,IGESData_ViewKindEntity)
0123 
0124 protected:
0125 
0126 
0127 
0128 
0129 private:
0130 
0131 
0132   Handle(IGESDraw_HArray1OfViewKindEntity) theViewEntities;
0133   Handle(TColStd_HArray1OfInteger) theLineFonts;
0134   Handle(IGESBasic_HArray1OfLineFontEntity) theLineDefinitions;
0135   Handle(TColStd_HArray1OfInteger) theColorValues;
0136   Handle(IGESGraph_HArray1OfColor) theColorDefinitions;
0137   Handle(TColStd_HArray1OfInteger) theLineWeights;
0138   Handle(IGESData_HArray1OfIGESEntity) theDisplayEntities;
0139 
0140 
0141 };
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 #endif // _IGESDraw_ViewsVisibleWithAttr_HeaderFile