Commit | Line | Data |
---|---|---|
973c2be1 | 1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 2 | // |
973c2be1 | 3 | // This file is part of Open CASCADE Technology software library. |
b311480e | 4 | // |
973c2be1 | 5 | // This library is free software; you can redistribute it and / or modify it |
6 | // under the terms of the GNU Lesser General Public version 2.1 as published | |
7 | // by the Free Software Foundation, with special exception defined in the file | |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT | |
9 | // distribution for complete text of the license and disclaimer of any warranty. | |
b311480e | 10 | // |
973c2be1 | 11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. | |
b311480e | 13 | |
7fd59977 | 14 | #include <IFSelect_Selection.ixx> |
15 | #include <Interface_Graph.hxx> | |
16 | #include <Interface_GraphContent.hxx> | |
17 | ||
18 | ||
19 | ||
b311480e | 20 | Standard_Boolean IFSelect_Selection::HasUniqueResult () const |
7fd59977 | 21 | { return Standard_False; } // eminemment redefinissable |
22 | ||
23 | // UniqueResult, c est RootResult passe par une Map (-> mis a plat) | |
24 | ||
25 | Interface_EntityIterator IFSelect_Selection::UniqueResult | |
26 | (const Interface_Graph& G) const | |
27 | { | |
28 | Interface_EntityIterator iter = RootResult(G); | |
bc650d41 G |
29 | if (HasUniqueResult() || !G.ModeStat()) |
30 | return iter; | |
7fd59977 | 31 | Interface_Graph GG(G); |
32 | GG.GetFromIter(iter,0); | |
33 | return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) | |
34 | } | |
35 | ||
36 | // CompleteResult, c est RootResult + propagation du partage (Shareds) | |
37 | ||
38 | Interface_EntityIterator IFSelect_Selection::CompleteResult | |
39 | (const Interface_Graph& G) const | |
40 | { | |
41 | Interface_EntityIterator iter = RootResult(G); | |
42 | // On peut utiliser le Graphe a present | |
43 | Interface_Graph GG(G); | |
44 | for (iter.Start(); iter.More(); iter.Next()) { | |
45 | Handle(Standard_Transient) ent = iter.Value(); | |
46 | GG.GetFromEntity(ent,Standard_True); // et voila | |
47 | } | |
48 | return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) | |
49 | } |