1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
18 #include <IGESSelect_SelectBypassSubfigure.ixx>
19 #include <IGESData_IGESEntity.hxx>
20 #include <IGESBasic_SubfigureDef.hxx>
21 #include <IGESBasic_SingularSubfigure.hxx>
22 #include <IGESDraw_NetworkSubfigureDef.hxx>
23 #include <IGESDraw_NetworkSubfigure.hxx>
24 #include <IGESDraw_RectArraySubfigure.hxx>
25 #include <IGESDraw_CircArraySubfigure.hxx>
27 #include <Interface_Macros.hxx>
31 IGESSelect_SelectBypassSubfigure::IGESSelect_SelectBypassSubfigure
32 (const Standard_Integer level)
33 : IFSelect_SelectExplore (level) { }
36 Standard_Boolean IGESSelect_SelectBypassSubfigure::Explore
37 (const Standard_Integer level, const Handle(Standard_Transient)& ent,
38 const Interface_Graph& G, Interface_EntityIterator& explored) const
40 DeclareAndCast(IGESData_IGESEntity,igesent,ent);
41 if (igesent.IsNull()) return Standard_False;
42 Standard_Integer igt = igesent->TypeNumber();
46 DeclareAndCast(IGESBasic_SubfigureDef,subf,ent);
47 if (subf.IsNull()) return Standard_True;
48 Standard_Integer i,nb = subf->NbEntities();
49 for (i = 1; i <= nb; i ++) explored.AddItem (subf->AssociatedEntity(i));
53 DeclareAndCast(IGESBasic_SingularSubfigure,subf,ent);
54 explored.AddItem (subf->Subfigure());
59 DeclareAndCast(IGESDraw_NetworkSubfigureDef,subf,ent);
60 if (subf.IsNull()) return Standard_True;
61 Standard_Integer i,nb = subf->NbEntities();
62 for (i = 1; i <= nb; i ++) explored.AddItem (subf->Entity(i));
66 DeclareAndCast(IGESDraw_NetworkSubfigure,subf,ent);
67 explored.AddItem (subf->SubfigureDefinition());
72 DeclareAndCast(IGESDraw_RectArraySubfigure,subf,ent);
73 explored.AddItem (subf->BaseEntity());
76 DeclareAndCast(IGESDraw_CircArraySubfigure,subf,ent);
77 explored.AddItem (subf->BaseEntity());
80 // Si c est pas tout ca, c est un objet de base et on le prend tel quel
85 TCollection_AsciiString IGESSelect_SelectBypassSubfigure::ExploreLabel () const
86 { return TCollection_AsciiString ("Content of Subfigures"); }