1 #include <IFSelect_SelectSignedSharing.ixx>
4 IFSelect_SelectSignedSharing::IFSelect_SelectSignedSharing
5 (const Handle(IFSelect_Signature)& matcher,
6 const Standard_CString signtext, const Standard_Boolean exact,
7 const Standard_Integer level)
8 : IFSelect_SelectExplore (level) ,
9 thematcher (matcher) , thesigntext (signtext) , theexact (exact) { }
11 Handle(IFSelect_Signature) IFSelect_SelectSignedSharing::Signature () const
12 { return thematcher; }
14 const TCollection_AsciiString& IFSelect_SelectSignedSharing::SignatureText () const
15 { return thesigntext; }
17 Standard_Boolean IFSelect_SelectSignedSharing::IsExact () const
21 Standard_Boolean IFSelect_SelectSignedSharing::Explore
22 (const Standard_Integer level, const Handle(Standard_Transient)& ent,
23 const Interface_Graph& G, Interface_EntityIterator& explored) const
25 if (thematcher->Matches (ent,G.Model(),thesigntext,theexact)) return Standard_True;
27 // sinon, on fait le tri ici
28 Interface_EntityIterator list = G.Sharings (ent);
29 // Si plus de Sharing, alors c est cuit
30 if (list.NbEntities() == 0) return Standard_False;
32 // Sinon, trier si on est au niveau
33 if (level < Level()) { explored = list; return Standard_True; }
34 for (list.Start(); list.More(); list.Next()) {
35 if (thematcher->Matches (list.Value(),G.Model(),thesigntext,theexact))
36 explored.AddItem (list.Value());
42 TCollection_AsciiString IFSelect_SelectSignedSharing::ExploreLabel () const
44 TCollection_AsciiString lab("Sharing,");
45 lab.AssignCat (thematcher->Name());
46 if (theexact) lab.AssignCat(" matching ");
47 else lab.AssignCat(" containing ");
48 lab.AssignCat(thesigntext);