Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-16 10:22:09

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 //! This selection looks at Level Number of IGES Entities :
0031 //! it considers items attached, either to a single level with a
0032 //! given value, or to a level list which contains this value
0033 //!
0034 //! Level = 0  means entities not attached to any level
0035 //!
0036 //! Remark : the class CounterOfLevelNumber gives information
0037 //! about present levels in a file.
0038 class IGESSelect_SelectLevelNumber : public IFSelect_SelectExtract
0039 {
0040 
0041 public:
0042   //! Creates a SelectLevelNumber, with no Level criterium : see
0043   //! SetLevelNumber. Empty, this selection filters nothing.
0044   Standard_EXPORT IGESSelect_SelectLevelNumber();
0045 
0046   //! Sets a Parameter as Level criterium
0047   Standard_EXPORT void SetLevelNumber(const occ::handle<IFSelect_IntParam>& levnum);
0048 
0049   //! Returns the Level criterium. NullHandle if not yet set
0050   //! (interpreted as Level = 0 : no level number attached)
0051   Standard_EXPORT occ::handle<IFSelect_IntParam> LevelNumber() const;
0052 
0053   //! Returns True if <ent> is an IGES Entity with Level Number
0054   //! admits the criterium (= value if single level, or one of the
0055   //! attached level numbers = value if level list)
0056   Standard_EXPORT bool Sort(const int                                    rank,
0057                             const occ::handle<Standard_Transient>&       ent,
0058                             const occ::handle<Interface_InterfaceModel>& model) const override;
0059 
0060   //! Returns the Selection criterium :
0061   //! "IGES Entity, Level Number admits <nn>" (if nn > 0) or
0062   //! "IGES Entity attached to no Level" (if nn = 0)
0063   Standard_EXPORT TCollection_AsciiString ExtractLabel() const override;
0064 
0065   DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectLevelNumber, IFSelect_SelectExtract)
0066 
0067 private:
0068   occ::handle<IFSelect_IntParam> thelevnum;
0069 };
0070 
0071 #endif // _IGESSelect_SelectLevelNumber_HeaderFile