0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / IFSelect / IFSelect_SelectRoots.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IFSelect_SelectRoots_HeaderFile
18#define _IFSelect_SelectRoots_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <IFSelect_SelectExtract.hxx>
24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26class Interface_EntityIterator;
27class Interface_Graph;
28class Standard_Transient;
29class Interface_InterfaceModel;
30class TCollection_AsciiString;
31
32
33class IFSelect_SelectRoots;
34DEFINE_STANDARD_HANDLE(IFSelect_SelectRoots, IFSelect_SelectExtract)
35
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)
39class IFSelect_SelectRoots : public IFSelect_SelectExtract
40{
41
42public:
43
44
45 //! Creates a SelectRoots
46 Standard_EXPORT IFSelect_SelectRoots();
47
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;
53
54 //! Returns always True, because RootResult has done work
79104795 55 Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
42cf5bc1 56
57 //! Returns a text defining the criterium : "Local Root Entities"
79104795 58 Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
42cf5bc1 59
60
61
62
92efcf78 63 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectRoots,IFSelect_SelectExtract)
42cf5bc1 64
65protected:
66
67
68 //! Returns True, because RootResult assures uniqueness
69 Standard_EXPORT virtual Standard_Boolean HasUniqueResult() const Standard_OVERRIDE;
70
71
72
73private:
74
75
76
77
78};
79
80
81
82
83
84
85
86#endif // _IFSelect_SelectRoots_HeaderFile