1 #include <IFSelect_SelectRoots.ixx>
2 #include <IFGraph_Cumulate.hxx>
5 IFSelect_SelectRoots::IFSelect_SelectRoots () { }
8 // Refait pour travailler en une fois
10 Interface_EntityIterator IFSelect_SelectRoots::RootResult
11 (const Interface_Graph& G) const
13 Interface_EntityIterator input = InputResult(G);
14 Interface_EntityIterator iter;
15 IFGraph_Cumulate GC(G);
17 // On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous
18 // niveaux). Les Roots initiales comptees une seule fois sont bonnes
19 for (input.Start(); input.More(); input.Next()) {
20 Handle(Standard_Transient) ent = input.Value();
21 GC.GetFromEntity(ent);
23 // A present, on retient, parmi les inputs, celles comptees une seule fois
24 for (input.Start(); input.More(); input.Next()) {
25 Handle(Standard_Transient) ent = input.Value();
26 if ((Standard_Boolean)(GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
31 Standard_Boolean IFSelect_SelectRoots::HasUniqueResult () const
32 { return Standard_True; }
34 Standard_Boolean IFSelect_SelectRoots::Sort
35 (const Standard_Integer , const Handle(Standard_Transient)& ,
36 const Handle(Interface_InterfaceModel)& ) const
37 { return Standard_True; }
39 TCollection_AsciiString IFSelect_SelectRoots::ExtractLabel () const
40 { return TCollection_AsciiString("Local Roots"); }