0022627: Change OCCT memory management defaults
[occt.git] / src / IFSelect / IFSelect_Selection.cxx
CommitLineData
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);
bc650d41
G
16 if (HasUniqueResult() || !G.ModeStat())
17 return iter;
7fd59977 18 Interface_Graph GG(G);
19 GG.GetFromIter(iter,0);
20 return Interface_GraphContent(GG); // EntityIterator specialise (meme taille)
21}
22
23// CompleteResult, c est RootResult + propagation du partage (Shareds)
24
25 Interface_EntityIterator IFSelect_Selection::CompleteResult
26 (const Interface_Graph& G) const
27{
28 Interface_EntityIterator iter = RootResult(G);
29// On peut utiliser le Graphe a present
30 Interface_Graph GG(G);
31 for (iter.Start(); iter.More(); iter.Next()) {
32 Handle(Standard_Transient) ent = iter.Value();
33 GG.GetFromEntity(ent,Standard_True); // et voila
34 }
35 return Interface_GraphContent(GG); // EntityIterator specialise (meme taille)
36}