Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-27 09:38:05

0001 // Created on: 1998-10-15
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1998-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_GraphCounter_HeaderFile
0018 #define _IFSelect_GraphCounter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <IFSelect_SignCounter.hxx>
0023 #include <Standard_Transient.hxx>
0024 #include <NCollection_Sequence.hxx>
0025 #include <NCollection_HSequence.hxx>
0026 class IFSelect_SelectDeduct;
0027 class Interface_Graph;
0028 
0029 //! A GraphCounter computes values to be sorted with the help of
0030 //! a Graph. I.E. not from a Signature
0031 //!
0032 //! The default GraphCounter works with an Applied Selection (a
0033 //! SelectDeduct), the value is the count of selected entities
0034 //! from each input entities)
0035 class IFSelect_GraphCounter : public IFSelect_SignCounter
0036 {
0037 
0038 public:
0039   //! Creates a GraphCounter, without applied selection
0040   Standard_EXPORT IFSelect_GraphCounter(const bool withmap = true, const bool withlist = false);
0041 
0042   //! Returns the applied selection
0043   Standard_EXPORT occ::handle<IFSelect_SelectDeduct> Applied() const;
0044 
0045   //! Sets a new applied selection
0046   Standard_EXPORT void SetApplied(const occ::handle<IFSelect_SelectDeduct>& sel);
0047 
0048   //! Adds a list of entities in the context given by the graph
0049   //! Default takes the count of entities selected by the applied
0050   //! selection, when it is given each entity of the list
0051   //! Can be redefined
0052   Standard_EXPORT void AddWithGraph(
0053     const occ::handle<NCollection_HSequence<occ::handle<Standard_Transient>>>& list,
0054     const Interface_Graph&                                                     graph) override;
0055 
0056   DEFINE_STANDARD_RTTIEXT(IFSelect_GraphCounter, IFSelect_SignCounter)
0057 
0058 private:
0059   occ::handle<IFSelect_SelectDeduct> theapplied;
0060 };
0061 
0062 #endif // _IFSelect_GraphCounter_HeaderFile