0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESAppli / IGESAppli_NodalResults.cxx
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.
9 //
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.
12 //
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 //--------------------------------------------------------------------
21 //--------------------------------------------------------------------
22
23 #include <IGESAppli_NodalResults.ixx>
24 #include <Standard_OutOfRange.hxx>
25 #include <TColStd_HArray1OfReal.hxx>
26
27
28 IGESAppli_NodalResults::IGESAppli_NodalResults ()    {  }
29
30
31 // Data : Col -> // Nodes.  Row : Data per Node
32
33     void  IGESAppli_NodalResults::Init
34   (const Handle(IGESDimen_GeneralNote)&    aNote,
35    const Standard_Integer aNumber, const Standard_Real aTime,
36    const Handle(TColStd_HArray1OfInteger)& allNodeIdentifiers,
37    const Handle(IGESAppli_HArray1OfNode)&  allNodes,
38    const Handle(TColStd_HArray2OfReal)&    allData)
39 {
40   if (allNodes->Lower()   != 1 || allNodeIdentifiers->Lower() != 1 ||
41       allNodes->Length()  != allNodeIdentifiers->Length() ||
42       allData->LowerCol() != 1 || allData->LowerRow() != 1 ||
43       allNodes->Length()  != allData->UpperRow() )
44     Standard_DimensionMismatch::Raise("IGESAppli_NodalResults : Init");
45   theNote            = aNote;
46   theSubCaseNum      = aNumber;
47   theTime            = aTime;
48   theNodeIdentifiers = allNodeIdentifiers;
49   theNodes           = allNodes;
50   theData            = allData;
51   InitTypeAndForm(146,FormNumber());
52 // FormNumber -> Type of the Results
53 }
54
55     void  IGESAppli_NodalResults::SetFormNumber (const Standard_Integer form)
56 {
57   if (form < 0 || form > 34) Standard_OutOfRange::Raise
58     ("IGESAppli_NodalResults : SetFormNumber");
59   InitTypeAndForm(146,form);
60 }
61
62
63     Handle(IGESDimen_GeneralNote)  IGESAppli_NodalResults::Note () const
64 {
65   return theNote;
66 }
67
68     Handle(IGESAppli_Node)  IGESAppli_NodalResults::Node
69   (const Standard_Integer Index) const
70 {
71   return theNodes->Value(Index);
72 }
73
74     Standard_Integer  IGESAppli_NodalResults::NbNodes () const
75 {
76   return theNodes->Length();
77 }
78
79     Standard_Integer  IGESAppli_NodalResults::SubCaseNumber () const
80 {
81   return theSubCaseNum;
82 }
83
84     Standard_Real  IGESAppli_NodalResults::Time () const
85 {
86   return theTime;
87 }
88
89     Standard_Integer  IGESAppli_NodalResults::NbData () const
90 {
91   return theData->RowLength();
92 }
93
94     Standard_Integer  IGESAppli_NodalResults::NodeIdentifier
95   (const Standard_Integer Index) const
96 {
97   return theNodeIdentifiers->Value(Index);
98 }
99
100     Standard_Real  IGESAppli_NodalResults::Data
101   (const Standard_Integer NodeNum, const Standard_Integer DataNum) const
102 {
103   return theData->Value(NodeNum,DataNum);
104 }