0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / StepFEA / StepFEA_SymmetricTensor43dMember.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 <StepFEA_SymmetricTensor43dMember.ixx>
19#include <TCollection_HAsciiString.hxx>
20
21static Standard_CString AST = "ANISOTROPIC_SYMMETRIC_TENSOR4_3D";
22static Standard_CString IST = "FEA_ISOTROPIC_SYMMETRIC_TENSOR4_3D";
23static Standard_CString IOST = "FEA_ISO_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D";
24static Standard_CString TIST = "FEA_TRANSVERSE_ISOTROPIC_SYMMETRIC_TENSOR4_3D";
25static Standard_CString CNOST = "FEA_COLUMN_NORMALISED_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D";
26static Standard_CString CNMST = "FEA_COLUMN_NORMALISED_MONOCLINIC_SYMMETRIC_TENSOR4_3D";
27
28
29//=======================================================================
30//function : StepFEA_SymmetricTensor43dMember
31//purpose :
32//=======================================================================
33
34StepFEA_SymmetricTensor43dMember::StepFEA_SymmetricTensor43dMember () : mycase(0)
35{
36}
37
38
39//=======================================================================
40//function : HasName
41//purpose :
42//=======================================================================
43
44Standard_Boolean StepFEA_SymmetricTensor43dMember::HasName() const
45{
46 return mycase>0;
47}
48
49
50//=======================================================================
51//function : Name
52//purpose :
53//=======================================================================
54
55Standard_CString StepFEA_SymmetricTensor43dMember::Name() const
56{
57 switch(mycase) {
58 case 1 : return AST;
59 case 2 : return IST;
60 case 3 : return IOST;
61 case 4 : return TIST;
62 case 5 : return CNOST;
63 case 6 : return CNMST;
64 default : break;
65 }
66 return "";
67}
68
69
70//=======================================================================
71//function : CompareNames
72//purpose :
73//=======================================================================
74
75static Standard_Integer CompareNames(const Standard_CString name)
76{
77 Standard_Integer thecase =0;
78 if (!name || name[0] == '\0') thecase = 0;
79 else if(!strcmp (name,AST)) thecase = 1;
80 else if(!strcmp (name,IST)) thecase = 2;
81 else if(!strcmp (name,IOST)) thecase = 3;
82 else if(!strcmp (name,TIST)) thecase = 4;
83 else if(!strcmp (name,CNOST)) thecase = 5;
84 else if(!strcmp (name,CNMST)) thecase = 6;
85 return thecase;
86}
87
88
89//=======================================================================
90//function : SetName
91//purpose :
92//=======================================================================
93
94Standard_Boolean StepFEA_SymmetricTensor43dMember::SetName(const Standard_CString name)
95{
96 mycase = CompareNames(name);
97 return (mycase >0);
98}
99
100//=======================================================================
101//function : Matches
102//purpose :
103//=======================================================================
104
105Standard_Boolean StepFEA_SymmetricTensor43dMember::Matches(const Standard_CString name) const
106{
107 Standard_Integer thecase = CompareNames(name);
108 return (mycase==thecase);
109}