0022627: Change OCCT memory management defaults
[occt.git] / src / IFSelect / IFSelect_DispPerOne.cxx
1 #include <IFSelect_DispPerOne.ixx>
2 #include <IFSelect_Selection.hxx>
3 #include <IFGraph_SCRoots.hxx>
4 #include <Interface_InterfaceModel.hxx>
5 #include <Interface_EntityIterator.hxx>
6
7
8 //  Genere un paquet par racine (strong comp.) locale a la liste transmise
9
10
11     IFSelect_DispPerOne::IFSelect_DispPerOne ()    {  }
12
13     TCollection_AsciiString  IFSelect_DispPerOne::Label () const
14 {  return TCollection_AsciiString ("One File per Input Entity");  }
15
16
17     Standard_Boolean  IFSelect_DispPerOne::LimitedMax
18   (const Standard_Integer nbent, Standard_Integer& pcount) const 
19 {  pcount = nbent;  return Standard_True;  }
20
21     Standard_Boolean  IFSelect_DispPerOne::PacketsCount
22   (const Interface_Graph& G, Standard_Integer& pcount) const 
23 {  pcount = G.Size();  return Standard_True;  }
24
25     void  IFSelect_DispPerOne::Packets
26   (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const 
27 {
28   IFGraph_SCRoots packsc(G,Standard_False);  // OK pour SubPartsIterator
29   packsc.SetLoad();
30   packsc.GetFromIter(FinalSelection()->UniqueResult(G));
31 //   SCRoots a initie la resolution : decoupage en StrongComponants + selection
32 //   des Racines. Chaque Racine correspond a un Packet. CQFD
33   packs.GetParts(packsc);
34 }