Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-20 08:17:20

0001 // Created on: 1994-05-31
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1994-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 _IGESSelect_SelectLevelNumber_HeaderFile
0018 #define _IGESSelect_SelectLevelNumber_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_SelectExtract.hxx>
0024 #include <Standard_Integer.hxx>
0025 class IFSelect_IntParam;
0026 class Standard_Transient;
0027 class Interface_InterfaceModel;
0028 class TCollection_AsciiString;
0029 
0030 class IGESSelect_SelectLevelNumber;
0031 DEFINE_STANDARD_HANDLE(IGESSelect_SelectLevelNumber, IFSelect_SelectExtract)
0032 
0033 //! This selection looks at Level Number of IGES Entities :
0034 //! it considers items attached, either to a single level with a
0035 //! given value, or to a level list which contains this value
0036 //!
0037 //! Level = 0  means entities not attached to any level
0038 //!
0039 //! Remark : the class CounterOfLevelNumber gives information
0040 //! about present levels in a file.
0041 class IGESSelect_SelectLevelNumber : public IFSelect_SelectExtract
0042 {
0043 
0044 public:
0045   //! Creates a SelectLevelNumber, with no Level criterium : see
0046   //! SetLevelNumber. Empty, this selection filters nothing.
0047   Standard_EXPORT IGESSelect_SelectLevelNumber();
0048 
0049   //! Sets a Parameter as Level criterium
0050   Standard_EXPORT void SetLevelNumber(const Handle(IFSelect_IntParam)& levnum);
0051 
0052   //! Returns the Level criterium. NullHandle if not yet set
0053   //! (interpreted as Level = 0 : no level number attached)
0054   Standard_EXPORT Handle(IFSelect_IntParam) LevelNumber() const;
0055 
0056   //! Returns True if <ent> is an IGES Entity with Level Number
0057   //! admits the criterium (= value if single level, or one of the
0058   //! attached level numbers = value if level list)
0059   Standard_EXPORT Standard_Boolean
0060     Sort(const Standard_Integer                  rank,
0061          const Handle(Standard_Transient)&       ent,
0062          const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
0063 
0064   //! Returns the Selection criterium :
0065   //! "IGES Entity, Level Number admits <nn>" (if nn > 0) or
0066   //! "IGES Entity attached to no Level" (if nn = 0)
0067   Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
0068 
0069   DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectLevelNumber, IFSelect_SelectExtract)
0070 
0071 protected:
0072 private:
0073   Handle(IFSelect_IntParam) thelevnum;
0074 };
0075 
0076 #endif // _IGESSelect_SelectLevelNumber_HeaderFile