7fd59977 |
1 | #include <IFSelect_Selection.ixx> |
2 | #include <Interface_Graph.hxx> |
3 | #include <Interface_GraphContent.hxx> |
4 | |
5 | |
6 | |
7 | Standard_Boolean IFSelect_Selection::HasUniqueResult () const |
8 | { return Standard_False; } // eminemment redefinissable |
9 | |
10 | // UniqueResult, c est RootResult passe par une Map (-> mis a plat) |
11 | |
12 | Interface_EntityIterator IFSelect_Selection::UniqueResult |
13 | (const Interface_Graph& G) const |
14 | { |
15 | Interface_EntityIterator iter = RootResult(G); |
16 | if (HasUniqueResult()) return iter; |
17 | Interface_Graph GG(G); |
18 | GG.GetFromIter(iter,0); |
19 | return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) |
20 | } |
21 | |
22 | // CompleteResult, c est RootResult + propagation du partage (Shareds) |
23 | |
24 | Interface_EntityIterator IFSelect_Selection::CompleteResult |
25 | (const Interface_Graph& G) const |
26 | { |
27 | Interface_EntityIterator iter = RootResult(G); |
28 | // On peut utiliser le Graphe a present |
29 | Interface_Graph GG(G); |
30 | for (iter.Start(); iter.More(); iter.Next()) { |
31 | Handle(Standard_Transient) ent = iter.Value(); |
32 | GG.GetFromEntity(ent,Standard_True); // et voila |
33 | } |
34 | return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) |
35 | } |