1 // Created on: 1992-11-18
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-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_SelectRoots_HeaderFile
18 #define _IFSelect_SelectRoots_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <IFSelect_SelectExtract.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 class Interface_EntityIterator;
27 class Interface_Graph;
28 class Standard_Transient;
29 class Interface_InterfaceModel;
30 class TCollection_AsciiString;
33 class IFSelect_SelectRoots;
34 DEFINE_STANDARD_HANDLE(IFSelect_SelectRoots, IFSelect_SelectExtract)
36 //! A SelectRoots sorts the Entities which are local roots of a
37 //! set of Entities (not shared by other Entities inside this set,
38 //! even if they are shared by other Entities outside it)
39 class IFSelect_SelectRoots : public IFSelect_SelectExtract
45 //! Creates a SelectRoots
46 Standard_EXPORT IFSelect_SelectRoots();
48 //! Returns the list of local roots. It is redefined for a purpose
49 //! of effeciency : calling a Sort routine for each Entity would
50 //! cost more ressource than to work in once using a Map
51 //! RootResult takes in account the Direct status
52 Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE;
54 //! Returns always True, because RootResult has done work
55 Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
57 //! Returns a text defining the criterium : "Local Root Entities"
58 Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
63 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectRoots,IFSelect_SelectExtract)
68 //! Returns True, because RootResult assures uniqueness
69 Standard_EXPORT virtual Standard_Boolean HasUniqueResult() const Standard_OVERRIDE;
86 #endif // _IFSelect_SelectRoots_HeaderFile