1 // Created on: 1998-10-15
2 // Created by: Christian CAILLET
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IFSelect_GraphCounter_HeaderFile
18 #define _IFSelect_GraphCounter_HeaderFile
20 #include <Standard.hxx>
22 #include <IFSelect_SignCounter.hxx>
23 #include <TColStd_HSequenceOfTransient.hxx>
24 class IFSelect_SelectDeduct;
25 class Interface_Graph;
28 class IFSelect_GraphCounter;
29 DEFINE_STANDARD_HANDLE(IFSelect_GraphCounter, IFSelect_SignCounter)
31 //! A GraphCounter computes values to be sorted with the help of
32 //! a Graph. I.E. not from a Signature
34 //! The default GraphCounter works with an Applied Selection (a
35 //! SelectDeduct), the value is the count of selected entities
36 //! from each input entities)
37 class IFSelect_GraphCounter : public IFSelect_SignCounter
43 //! Creates a GraphCounter, without applied selection
44 Standard_EXPORT IFSelect_GraphCounter(const Standard_Boolean withmap = Standard_True, const Standard_Boolean withlist = Standard_False);
46 //! Returns the applied selection
47 Standard_EXPORT Handle(IFSelect_SelectDeduct) Applied() const;
49 //! Sets a new applied selection
50 Standard_EXPORT void SetApplied (const Handle(IFSelect_SelectDeduct)& sel);
52 //! Adds a list of entities in the context given by the graph
53 //! Default takes the count of entities selected by the applied
54 //! selection, when it is given each entity of the list
56 Standard_EXPORT virtual void AddWithGraph (const Handle(TColStd_HSequenceOfTransient)& list, const Interface_Graph& graph) Standard_OVERRIDE;
61 DEFINE_STANDARD_RTTIEXT(IFSelect_GraphCounter,IFSelect_SignCounter)
71 Handle(IFSelect_SelectDeduct) theapplied;
82 #endif // _IFSelect_GraphCounter_HeaderFile