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
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_SelectSignedShared_HeaderFile
18 #define _IFSelect_SelectSignedShared_HeaderFile
20 #include <Standard.hxx>
22 #include <TCollection_AsciiString.hxx>
23 #include <IFSelect_SelectExplore.hxx>
24 #include <Standard_Integer.hxx>
25 class IFSelect_Signature;
26 class Standard_Transient;
27 class Interface_Graph;
28 class Interface_EntityIterator;
31 class IFSelect_SelectSignedShared;
32 DEFINE_STANDARD_HANDLE(IFSelect_SelectSignedShared, IFSelect_SelectExplore)
34 //! In the graph, explore the Shareds of the input entities,
35 //! until it encounters some which match a given Signature
36 //! (for a limited level, filters the returned list)
37 //! By default, fitted for any level
38 class IFSelect_SelectSignedShared : public IFSelect_SelectExplore
44 //! Creates a SelectSignedShared, defaulted for any level
45 //! with a given Signature and text to match
46 Standard_EXPORT IFSelect_SelectSignedShared(const Handle(IFSelect_Signature)& matcher, const Standard_CString signtext, const Standard_Boolean exact = Standard_True, const Standard_Integer level = 0);
48 //! Returns the used Signature, then it is possible to access it,
49 //! modify it as required
50 Standard_EXPORT Handle(IFSelect_Signature) Signature() const;
52 //! Returns Text used to Sort Entity on its Signature
53 Standard_EXPORT const TCollection_AsciiString& SignatureText() const;
55 //! Returns True if match must be exact
56 Standard_EXPORT Standard_Boolean IsExact() const;
58 //! Explores an entity : its Shared entities
59 //! <ent> to take if it matches the Signature
60 //! At level max, filters the result. Else gives all Shareds
61 Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
63 //! Returns a text defining the criterium.
64 //! (it refers to the text and exact flag to be matched, and is
65 //! qualified by the Name provided by the Signature)
66 Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
71 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSignedShared,IFSelect_SelectExplore)
81 Handle(IFSelect_Signature) thematcher;
82 TCollection_AsciiString thesigntext;
83 Standard_Boolean theexact;
94 #endif // _IFSelect_SelectSignedShared_HeaderFile