0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / IFSelect / IFSelect_SelectSignedSharing.hxx
1 // Created on: 1996-09-25
2 // Created by: Christian CAILLET
3 // Copyright (c) 1996-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_SelectSignedSharing_HeaderFile
18 #define _IFSelect_SelectSignedSharing_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TCollection_AsciiString.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <IFSelect_SelectExplore.hxx>
26 #include <Standard_CString.hxx>
27 #include <Standard_Integer.hxx>
28 class IFSelect_Signature;
29 class TCollection_AsciiString;
30 class Standard_Transient;
31 class Interface_Graph;
32 class Interface_EntityIterator;
33
34
35 class IFSelect_SelectSignedSharing;
36 DEFINE_STANDARD_HANDLE(IFSelect_SelectSignedSharing, IFSelect_SelectExplore)
37
38 //! In the graph, explore the sharings of the input entities,
39 //! until it encounters some which match a given Signature
40 //! (for a limited level, filters the returned list)
41 //! By default, fitted for any level
42 class IFSelect_SelectSignedSharing : public IFSelect_SelectExplore
43 {
44
45 public:
46
47   
48   //! Creates a SelectSignedSharing, defaulted for any level
49   //! with a given Signature and text to match
50   Standard_EXPORT IFSelect_SelectSignedSharing(const Handle(IFSelect_Signature)& matcher, const Standard_CString signtext, const Standard_Boolean exact = Standard_True, const Standard_Integer level = 0);
51   
52   //! Returns the used Signature, then it is possible to access it,
53   //! modify it as required
54   Standard_EXPORT Handle(IFSelect_Signature) Signature() const;
55   
56   //! Returns Text used to Sort Entity on its Signature
57   Standard_EXPORT const TCollection_AsciiString& SignatureText() const;
58   
59   //! Returns True if match must be exact
60   Standard_EXPORT Standard_Boolean IsExact() const;
61   
62   //! Explores an entity : its sharing entities
63   //! <ent> to take if it matches the Signature
64   //! At level max, filters the result. Else gives all sharings
65   Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
66   
67   //! Returns a text defining the criterium.
68   //! (it refers to the text and exact flag to be matched, and is
69   //! qualified by the Name provided by the Signature)
70   Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
71
72
73
74
75   DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSignedSharing,IFSelect_SelectExplore)
76
77 protected:
78
79
80
81
82 private:
83
84
85   Handle(IFSelect_Signature) thematcher;
86   TCollection_AsciiString thesigntext;
87   Standard_Boolean theexact;
88
89
90 };
91
92
93
94
95
96
97
98 #endif // _IFSelect_SelectSignedSharing_HeaderFile