0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESSelect / IGESSelect_SelectBypassSubfigure.cxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
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.
7 //
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.
10 //
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.
17
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>
26
27 #include <Interface_Macros.hxx>
28
29
30
31 IGESSelect_SelectBypassSubfigure::IGESSelect_SelectBypassSubfigure
32   (const Standard_Integer level)
33   : IFSelect_SelectExplore (level)    {  }
34
35
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
39 {
40   DeclareAndCast(IGESData_IGESEntity,igesent,ent);
41   if (igesent.IsNull()) return Standard_False;
42   Standard_Integer igt = igesent->TypeNumber();
43
44 //  SingularSubfigure
45   if (igt == 308) {
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));
50     return Standard_True;
51   }
52   if (igt == 408) {
53     DeclareAndCast(IGESBasic_SingularSubfigure,subf,ent);
54     explored.AddItem (subf->Subfigure());
55   }
56
57 //  NetworkSubfigure
58   if (igt == 320) {
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));
63     return Standard_True;
64   }
65   if (igt == 420) {
66     DeclareAndCast(IGESDraw_NetworkSubfigure,subf,ent);
67     explored.AddItem (subf->SubfigureDefinition());
68   }
69
70 //  (Pattern)Subfigure
71   if (igt == 412) {
72     DeclareAndCast(IGESDraw_RectArraySubfigure,subf,ent);
73     explored.AddItem (subf->BaseEntity());
74   }
75   if (igt == 414) {
76     DeclareAndCast(IGESDraw_CircArraySubfigure,subf,ent);
77     explored.AddItem (subf->BaseEntity());
78   }
79
80 //  Si c est pas tout ca, c est un objet de base et on le prend tel quel
81   return Standard_True;
82 }
83
84
85     TCollection_AsciiString IGESSelect_SelectBypassSubfigure::ExploreLabel () const
86       {  return TCollection_AsciiString ("Content of Subfigures");  }