0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESAppli / IGESAppli_ToolDrilledHole.cxx
CommitLineData
b311480e 1// Created by: CKY / Contract Toubro-Larsen
2// Copyright (c) 1993-1999 Matra Datavision
3// Copyright (c) 1999-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
7fd59977 9//
b311480e 10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
7fd59977 12//
b311480e 13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
20//--------------------------------------------------------------------
7fd59977 21//--------------------------------------------------------------------
22
23#include <IGESAppli_ToolDrilledHole.ixx>
24#include <IGESData_ParamCursor.hxx>
25#include <IGESData_LevelListEntity.hxx>
26
27
28IGESAppli_ToolDrilledHole::IGESAppli_ToolDrilledHole () { }
29
30
31void IGESAppli_ToolDrilledHole::ReadOwnParams
32 (const Handle(IGESAppli_DrilledHole)& ent,
33 const Handle(IGESData_IGESReaderData)& /*IR*/, IGESData_ParamReader& PR) const
34{
35 Standard_Integer tempNbPropertyValues;
36 Standard_Real tempDrillDiaSize;
37 Standard_Real tempFinishDiaSize;
38 Standard_Integer tempPlatingFlag;
39 Standard_Integer tempNbLowerLayer;
40 Standard_Integer tempNbHigherLayer;
41 //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
42
43 //szv#4:S4163:12Mar99 `st=` not needed
44 PR.ReadInteger(PR.Current(),"No. of Property values",tempNbPropertyValues);
45 PR.ReadReal(PR.Current(),"Drill diameter size",tempDrillDiaSize);
46 PR.ReadReal(PR.Current(),"Finish diameter size",tempFinishDiaSize);
47 PR.ReadInteger(PR.Current(),"Plating Flag",tempPlatingFlag);
48 PR.ReadInteger(PR.Current(),"Lower numbered layer", tempNbLowerLayer);
49 PR.ReadInteger(PR.Current(),"Higher numbered layer", tempNbHigherLayer);
50
51 DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
52 ent->Init(tempNbPropertyValues,tempDrillDiaSize,tempFinishDiaSize,
53 tempPlatingFlag, tempNbLowerLayer,tempNbHigherLayer);
54}
55
56void IGESAppli_ToolDrilledHole::WriteOwnParams
57 (const Handle(IGESAppli_DrilledHole)& ent, IGESData_IGESWriter& IW) const
58{
59 IW.Send(ent->NbPropertyValues());
60 IW.Send(ent->DrillDiaSize());
61 IW.Send(ent->FinishDiaSize());
62 IW.SendBoolean(ent->IsPlating());
63 IW.Send(ent->NbLowerLayer());
64 IW.Send(ent->NbHigherLayer());
65}
66
67void IGESAppli_ToolDrilledHole::OwnShared
68 (const Handle(IGESAppli_DrilledHole)& /*ent*/, Interface_EntityIterator& /*iter*/) const
69{
70}
71
72void IGESAppli_ToolDrilledHole::OwnCopy
73 (const Handle(IGESAppli_DrilledHole)& another,
74 const Handle(IGESAppli_DrilledHole)& ent, Interface_CopyTool& /*TC*/) const
75{
76 ent->Init
77 (5,another->DrillDiaSize(),another->FinishDiaSize(),
78 (another->IsPlating() ? 1 : 0),
79 another->NbLowerLayer(),another->NbHigherLayer());
80}
81
82
83Standard_Boolean IGESAppli_ToolDrilledHole::OwnCorrect
84 (const Handle(IGESAppli_DrilledHole)& ent) const
85{
86 Standard_Boolean res = (ent->NbPropertyValues() != 5);
87 if (res) ent->Init
88 (5,ent->DrillDiaSize(),ent->FinishDiaSize(),(ent->IsPlating() ? 1 : 0),
89 ent->NbLowerLayer(),ent->NbHigherLayer());
90 if (ent->SubordinateStatus() != 0) {
91 Handle(IGESData_LevelListEntity) nulevel;
92 ent->InitLevel(nulevel,0);
93 res = Standard_True;
94 } // NbPropertyvalues = 5 + RAZ level selon subordinate
95 return res;
96}
97
98IGESData_DirChecker IGESAppli_ToolDrilledHole::DirChecker
99 (const Handle(IGESAppli_DrilledHole)& /*ent*/) const
100{
101 IGESData_DirChecker DC(406,6); //Form no = 6 & Type = 406
102 DC.Structure(IGESData_DefVoid);
103 DC.GraphicsIgnored();
104 DC.BlankStatusIgnored();
105 DC.UseFlagIgnored();
106 DC.HierarchyStatusIgnored();
107 return DC;
108}
109
110void IGESAppli_ToolDrilledHole::OwnCheck
111 (const Handle(IGESAppli_DrilledHole)& ent,
112 const Interface_ShareTool& , Handle(Interface_Check)& ach) const
113{
114 if (ent->SubordinateStatus() != 0)
115 if (ent->DefLevel() != IGESData_DefOne &&
116 ent->DefLevel() != IGESData_DefSeveral)
117 ach->AddFail("Level type : Not value/reference");
118 if (ent->NbPropertyValues() != 5)
119 ach->AddFail("Number of Property Values != 5");
120}
121
122void IGESAppli_ToolDrilledHole::OwnDump
123 (const Handle(IGESAppli_DrilledHole)& ent, const IGESData_IGESDumper& /*dumper*/,
124 const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const
125{
126 S << "IGESAppli_DrilledHole" << endl;
127
128 S << "Number of property values : " << ent->NbPropertyValues() << endl;
129 S << "Drill diameter size :" << ent->DrillDiaSize() << " ";
130 S << "Finish diameter size : " << ent->FinishDiaSize() << endl;
131 S << "Plating indication flag : ";
132 if (!ent->IsPlating()) S << "NO" << " - ";
133 else S << "YES" << " - ";
134 S << "Lower Numbered Layer : " << ent->NbLowerLayer() << " ";
135 S << "Higher Numbered Layer : " << ent->NbHigherLayer() << endl;
136}