0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESAppli / IGESAppli_ToolFiniteElement.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_ToolFiniteElement.ixx>
24#include <IGESData_ParamCursor.hxx>
25#include <IGESAppli_Node.hxx>
26#include <IGESAppli_HArray1OfNode.hxx>
27#include <TCollection_HAsciiString.hxx>
28#include <IGESData_Dump.hxx>
29#include <Interface_Macros.hxx>
30
31
32IGESAppli_ToolFiniteElement::IGESAppli_ToolFiniteElement () { }
33
34
35void IGESAppli_ToolFiniteElement::ReadOwnParams
36 (const Handle(IGESAppli_FiniteElement)& ent,
37 const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const
38{
39 Standard_Integer tempTopology;
40 Handle(TCollection_HAsciiString) tempName;
41 Standard_Integer nbval = 0;
42 //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
43 Handle(IGESAppli_HArray1OfNode) tempData;
44
45 //szv#4:S4163:12Mar99 `st=` not needed
46 PR.ReadInteger(PR.Current(),"Topology type",tempTopology);
47 PR.ReadInteger(PR.Current(),"No. of nodes defining element",nbval);
48 tempData = new IGESAppli_HArray1OfNode(1,nbval);
49 for (Standard_Integer i = 1; i <= nbval; i ++)
50 {
51 Handle(IGESAppli_Node) tempNode;
52 //szv#4:S4163:12Mar99 moved in if
53 if (PR.ReadEntity (IR,PR.Current(),"Node defining element", STANDARD_TYPE(IGESAppli_Node),tempNode))
54 tempData->SetValue(i,tempNode);
55 }
56 PR.ReadText(PR.Current(),"Element type name",tempName); //szv#4:S4163:12Mar99 `st=` not needed
57
58 DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
59 ent->Init(tempTopology,tempData,tempName);
60}
61
62void IGESAppli_ToolFiniteElement::WriteOwnParams
63 (const Handle(IGESAppli_FiniteElement)& ent, IGESData_IGESWriter& IW) const
64{
65 Standard_Integer upper = ent->NbNodes();
66 IW.Send(ent->Topology());
67 IW.Send(upper);
68 for (Standard_Integer i= 1; i <= upper ; i ++)
69 IW.Send(ent->Node(i));
70 IW.Send(ent->Name());
71}
72
73void IGESAppli_ToolFiniteElement::OwnShared
74 (const Handle(IGESAppli_FiniteElement)& ent, Interface_EntityIterator& iter) const
75{
76 Standard_Integer upper = ent->NbNodes();
77 for (Standard_Integer i= 1; i <= upper ; i ++)
78 iter.GetOneItem(ent->Node(i));
79}
80
81void IGESAppli_ToolFiniteElement::OwnCopy
82 (const Handle(IGESAppli_FiniteElement)& another,
83 const Handle(IGESAppli_FiniteElement)& ent, Interface_CopyTool& TC) const
84{
85 Standard_Integer aTopology = another->Topology();
86 Handle(TCollection_HAsciiString) aName =
87 new TCollection_HAsciiString(another->Name());
88 Standard_Integer nbval = another->NbNodes();
89 Handle(IGESAppli_HArray1OfNode) aList = new
90 IGESAppli_HArray1OfNode(1,nbval);
91 for (Standard_Integer i=1;i <=nbval;i++)
92 {
93 DeclareAndCast(IGESAppli_Node,aEntity,TC.Transferred(another->Node(i)));
94 aList->SetValue(i,aEntity);
95 }
96 ent->Init(aTopology,aList,aName);
97}
98
99IGESData_DirChecker IGESAppli_ToolFiniteElement::DirChecker
100 (const Handle(IGESAppli_FiniteElement)& /* ent */ ) const
101{
102 IGESData_DirChecker DC(136,0); //Form no = 0 & Type = 136
103 DC.Structure(IGESData_DefVoid);
104 DC.LineFont(IGESData_DefAny);
105 DC.LineWeight(IGESData_DefVoid);
106 DC.Color(IGESData_DefAny);
107 DC.BlankStatusIgnored();
108 DC.SubordinateStatusIgnored();
109 DC.UseFlagIgnored();
110 DC.HierarchyStatusIgnored();
111 return DC;
112}
113
114void IGESAppli_ToolFiniteElement::OwnCheck
115 (const Handle(IGESAppli_FiniteElement)& /* ent */,
116 const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const
117{
118}
119
120void IGESAppli_ToolFiniteElement::OwnDump
121 (const Handle(IGESAppli_FiniteElement)& ent, const IGESData_IGESDumper& dumper,
122 const Handle(Message_Messenger)& S, const Standard_Integer level) const
123{
124 S << "IGESAppli_FiniteElement" << endl;
125
126 S << "Topology type : " << ent->Topology() << endl;
127 S << "Nodes : ";
128 IGESData_DumpEntities(S,dumper ,level,1, ent->NbNodes(),ent->Node);
129 S << endl << "Element Name : " << ent->Name();
130 S << endl;
131}