]>
Commit | Line | Data |
---|---|---|
7fd59977 | 1 | #include <IFSelect_Dispatch.ixx> |
2 | #include <IFGraph_Compare.hxx> | |
3 | ||
4 | ||
5 | void IFSelect_Dispatch::SetRootName | |
6 | (const Handle(TCollection_HAsciiString)& name) | |
7 | { | |
8 | thename = name; | |
9 | } | |
10 | ||
11 | Standard_Boolean IFSelect_Dispatch::HasRootName () const | |
12 | { return (!thename.IsNull()); } | |
13 | ||
14 | const Handle(TCollection_HAsciiString)& IFSelect_Dispatch::RootName () const | |
15 | { return thename; } | |
16 | ||
17 | void IFSelect_Dispatch::SetFinalSelection | |
18 | (const Handle(IFSelect_Selection)& sel) | |
19 | { thefinal = sel; } | |
20 | ||
21 | Handle(IFSelect_Selection) IFSelect_Dispatch::FinalSelection () const | |
22 | { return thefinal; } | |
23 | ||
24 | IFSelect_SelectionIterator IFSelect_Dispatch::Selections () const | |
25 | { | |
26 | IFSelect_SelectionIterator iter; | |
27 | iter.AddItem(thefinal); | |
28 | for(; iter.More(); iter.Next()) { | |
29 | iter.Value()->FillIterator(iter); // Iterateur qui se court apres | |
30 | } | |
31 | return iter; | |
32 | } | |
33 | ||
34 | ||
35 | Standard_Boolean IFSelect_Dispatch::CanHaveRemainder () const | |
36 | { return Standard_False; } | |
37 | ||
38 | Standard_Boolean IFSelect_Dispatch::LimitedMax | |
39 | (const Standard_Integer , Standard_Integer& max) const | |
40 | { max = 0; return Standard_False; } | |
41 | ||
42 | Interface_EntityIterator IFSelect_Dispatch::GetEntities | |
43 | (const Interface_Graph& G) const | |
44 | { return thefinal->UniqueResult(G); } | |
45 | ||
46 | Standard_Boolean IFSelect_Dispatch::PacketsCount | |
47 | (const Interface_Graph& , Standard_Integer& pcount) const | |
48 | { pcount = 0; return Standard_False; } // par defaut 0 | |
49 | ||
50 | Interface_EntityIterator IFSelect_Dispatch::Packeted | |
51 | (const Interface_Graph& G) const | |
52 | { | |
53 | Interface_EntityIterator total = GetEntities(G); | |
54 | Interface_EntityIterator remain = Remainder(G); | |
55 | if (remain.NbEntities() == 0) return total; | |
56 | // sinon, faire la difference ! | |
57 | IFGraph_Compare GC(G); | |
58 | GC.GetFromIter (total, Standard_True); | |
59 | GC.GetFromIter (remain,Standard_False); | |
60 | return GC.FirstOnly(); | |
61 | } | |
62 | ||
63 | Interface_EntityIterator IFSelect_Dispatch::Remainder | |
64 | (const Interface_Graph& ) const | |
65 | { Interface_EntityIterator iter; return iter; } // par defaut vide |