0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESSelect / IGESSelect_SelectSubordinate.cxx
CommitLineData
b311480e 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
7fd59977 18#include <IGESSelect_SelectSubordinate.ixx>
19#include <IGESData_IGESEntity.hxx>
20#include <Interface_Macros.hxx>
21
22
23
b311480e 24IGESSelect_SelectSubordinate::IGESSelect_SelectSubordinate
7fd59977 25 (const Standard_Integer status) { thestatus = status; }
26
27 Standard_Integer IGESSelect_SelectSubordinate::Status () const
28 { return thestatus; }
29
30 Standard_Boolean IGESSelect_SelectSubordinate::Sort
31 (const Standard_Integer, const Handle(Standard_Transient)& ent,
35e08fe8 32 const Handle(Interface_InterfaceModel)& /*model*/) const
7fd59977 33{
34 DeclareAndCast(IGESData_IGESEntity,igesent,ent);
35 if (igesent.IsNull()) return Standard_False;
36 Standard_Integer sub = igesent->SubordinateStatus();
37 if (sub == thestatus) return Standard_True;
38 if (thestatus == 4 && (sub == 1 || sub == 3)) return Standard_True;
39 if (thestatus == 5 && (sub == 2 || sub == 3)) return Standard_True;
40 if (thestatus == 6 && sub != 0) return Standard_True;
41 return Standard_False;
42}
43
44 TCollection_AsciiString IGESSelect_SelectSubordinate::ExtractLabel () const
45{
46 TCollection_AsciiString lab("IGESEntity, Subordinate ");
47 if (thestatus == 0) lab.AssignCat("Independant (0)");
48 if (thestatus == 1) lab.AssignCat("Physically only Dependant (1)");
49 if (thestatus == 2) lab.AssignCat("Logically only Dependant (2) ");
50 if (thestatus == 3) lab.AssignCat("Both Phys. and Log. Dependant (3)");
51 if (thestatus == 4) lab.AssignCat("Physically Dependant (1 or 3)");
52 if (thestatus == 5) lab.AssignCat("Logically Dependant (2 or 3)");
53 if (thestatus == 6) lab.AssignCat("Dependant in any way (1 or 2 or 3)");
54 return lab;
55}