0022934: Wrong delete operator in IGESSelect_SelectFromDrawing.cxx / IGESSelect_Selec...
[occt.git] / src / IGESSelect / IGESSelect_SelectFromSingleView.cxx
CommitLineData
7fd59977 1#include <IGESSelect_SelectFromSingleView.ixx>
2#include <IGESData_IGESEntity.hxx>
3#include <Interface_Macros.hxx>
4
5
6
7 IGESSelect_SelectFromSingleView::IGESSelect_SelectFromSingleView () { }
8
9
10 Interface_EntityIterator IGESSelect_SelectFromSingleView::RootResult
11 (const Interface_Graph& G) const
12{
13 Interface_EntityIterator list;
14 Interface_EntityIterator views = InputResult(G);
15 if (views.NbEntities() == 0) return list;
16 Standard_Integer nb = G.Size();
7fd59977 17 Standard_Integer i; // svv Jan11 2000 : porting on DEC
7fd59977 18 for (i = 1; i <= nb; i ++) {
19// if (!G.IsPresent(i)) continue;
20 DeclareAndCast(IGESData_IGESEntity,igesent,G.Entity(i));
21 if (igesent.IsNull()) continue;
22 Standard_Integer nv = G.EntityNumber (igesent->View());
23 if (nv > 0 && nv <= nb) list.GetOneItem(igesent);
24 }
7fd59977 25 return list;
26}
27
28
29 TCollection_AsciiString IGESSelect_SelectFromSingleView::Label () const
30{ return TCollection_AsciiString ("Entities attached to a single View"); }