Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:53

0001 // Created on: 1992-11-17
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1992-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 _IFSelect_DispPerCount_HeaderFile
0018 #define _IFSelect_DispPerCount_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_Dispatch.hxx>
0024 #include <Standard_Integer.hxx>
0025 class IFSelect_IntParam;
0026 class TCollection_AsciiString;
0027 class Interface_Graph;
0028 class IFGraph_SubPartsIterator;
0029 
0030 
0031 class IFSelect_DispPerCount;
0032 DEFINE_STANDARD_HANDLE(IFSelect_DispPerCount, IFSelect_Dispatch)
0033 
0034 //! A DispPerCount gathers all the input Entities into one or
0035 //! several Packets, each containing a defined count of Entity
0036 //! This count is a Parameter of the DispPerCount, given as an
0037 //! IntParam, thus allowing external control of its Value
0038 class IFSelect_DispPerCount : public IFSelect_Dispatch
0039 {
0040 
0041 public:
0042 
0043   
0044   //! Creates a DispPerCount with no Count (default value 1)
0045   Standard_EXPORT IFSelect_DispPerCount();
0046   
0047   //! Returns the Count Parameter used for splitting
0048   Standard_EXPORT Handle(IFSelect_IntParam) Count() const;
0049   
0050   //! Sets a new Parameter for Count
0051   Standard_EXPORT void SetCount (const Handle(IFSelect_IntParam)& count);
0052   
0053   //! Returns the effective value of the count parameter
0054   //! (if Count Parameter not Set or value not positive, returns 1)
0055   Standard_EXPORT Standard_Integer CountValue() const;
0056   
0057   //! Returns as Label, "One File per <count> Input Entities"
0058   Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
0059   
0060   //! Returns True, maximum count is given as <nbent>
0061   Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const Standard_OVERRIDE;
0062 
0063   //! Computes the list of produced Packets. It defines Packets in
0064   //! order to have at most <Count> Entities per Packet, Entities
0065   //! are given by RootResult from the Final Selection.
0066   Standard_EXPORT void Packets (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const Standard_OVERRIDE;
0067 
0068 
0069 
0070 
0071   DEFINE_STANDARD_RTTIEXT(IFSelect_DispPerCount,IFSelect_Dispatch)
0072 
0073 protected:
0074 
0075 
0076 
0077 
0078 private:
0079 
0080 
0081   Handle(IFSelect_IntParam) thecount;
0082 
0083 
0084 };
0085 
0086 
0087 
0088 
0089 
0090 
0091 
0092 #endif // _IFSelect_DispPerCount_HeaderFile