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