Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-29 09:15:24

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 <TColStd_HSequenceOfTransient.hxx>
0024 class IFSelect_SelectDeduct;
0025 class Interface_Graph;
0026 
0027 class IFSelect_GraphCounter;
0028 DEFINE_STANDARD_HANDLE(IFSelect_GraphCounter, IFSelect_SignCounter)
0029 
0030 //! A GraphCounter computes values to be sorted with the help of
0031 //! a Graph. I.E. not from a Signature
0032 //!
0033 //! The default GraphCounter works with an Applied Selection (a
0034 //! SelectDeduct), the value is the count of selected entities
0035 //! from each input entities)
0036 class IFSelect_GraphCounter : public IFSelect_SignCounter
0037 {
0038 
0039 public:
0040   //! Creates a GraphCounter, without applied selection
0041   Standard_EXPORT IFSelect_GraphCounter(const Standard_Boolean withmap  = Standard_True,
0042                                         const Standard_Boolean withlist = Standard_False);
0043 
0044   //! Returns the applied selection
0045   Standard_EXPORT Handle(IFSelect_SelectDeduct) Applied() const;
0046 
0047   //! Sets a new applied selection
0048   Standard_EXPORT void SetApplied(const Handle(IFSelect_SelectDeduct)& sel);
0049 
0050   //! Adds a list of entities in the context given by the graph
0051   //! Default takes the count of entities selected by the applied
0052   //! selection, when it is given each entity of the list
0053   //! Can be redefined
0054   Standard_EXPORT virtual void AddWithGraph(const Handle(TColStd_HSequenceOfTransient)& list,
0055                                             const Interface_Graph& graph) Standard_OVERRIDE;
0056 
0057   DEFINE_STANDARD_RTTIEXT(IFSelect_GraphCounter, IFSelect_SignCounter)
0058 
0059 protected:
0060 private:
0061   Handle(IFSelect_SelectDeduct) theapplied;
0062 };
0063 
0064 #endif // _IFSelect_GraphCounter_HeaderFile