0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / StepFEA / StepFEA_DegreeOfFreedomMember.cxx
CommitLineData
b311480e 1// Created on: 2002-12-10
2// Created by: data exchange team
3// Copyright (c) 2002-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
7fd59977 20// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
7fd59977 21
22#include <StepFEA_DegreeOfFreedomMember.ixx>
23#include <TCollection_HAsciiString.hxx>
24
25static Standard_CString anEnumeratedCurveElementFreedom = "ENUMERATED_DEGREE_OF_FREEDOM";
26static Standard_CString anApplicationDefinedDegreeOfFreedom ="APPLICATION_DEFINED_DEGREE_OF_FREEDOM";
27
28//=======================================================================
29//function : StepFEA_DegreeOfFreedomMember
30//purpose :
31//=======================================================================
32
33StepFEA_DegreeOfFreedomMember::StepFEA_DegreeOfFreedomMember () : mycase(0)
34{
35}
36
37//=======================================================================
38//function : HasName
39//purpose :
40//=======================================================================
41
42Standard_Boolean StepFEA_DegreeOfFreedomMember::HasName() const
43{
44 return mycase >0;
45}
46
47//=======================================================================
48//function : Name
49//purpose :
50//=======================================================================
51
52Standard_CString StepFEA_DegreeOfFreedomMember::Name() const
53{
54 switch(mycase) {
55 case 1 : return anEnumeratedCurveElementFreedom;
56 case 2 : return anApplicationDefinedDegreeOfFreedom;
57 default : break;
58 }
59 return "";
60}
61
62//=======================================================================
63//function : CompareNames
64//purpose :
65//=======================================================================
66
35e08fe8 67static Standard_Integer CompareNames(const Standard_CString name,Standard_Integer &/*numen*/)
7fd59977 68{
69 Standard_Integer thecase =0;
70 if (!name || name[0] == '\0') thecase = 0;
71 else if(!strcmp (name,anEnumeratedCurveElementFreedom)) {
72 thecase = 1;
73 }
74 else if(!strcmp (name,anApplicationDefinedDegreeOfFreedom)) {
75 thecase = 2;
76 }
77 /*if (!name || name[0] == '\0') thecase = 0;
78 else if(!strcmp (name,"XTranslation")) {
79 thecase = 1;
80 numen = 1;
81 }
82 else if(!strcmp (name,"YTranslation")) {
83 thecase = 1;
84 numen = 2;
85 }
86 else if(!strcmp (name,"ZTranslation")) {
87 thecase = 1;
88 numen = 3;
89 }
90 else if(!strcmp (name,"XRotation")) {
91 thecase = 1;
92 numen = 4;
93 }
94 else if(!strcmp (name,"YRotation")) {
95 thecase = 1;
96 numen = 5;
97 }
98 else if(!strcmp (name,"ZRotation")) {
99 thecase = 1;
100 numen = 6;
101 }
102 else if(!strcmp (name,"Warp")) {
103 thecase = 1;
104 numen = 7;
105 }
106 else if(!strcmp (name,"None")) {
107 thecase = 1;
108 numen = 8;
109 }
110 else if(!strcmp (name,"ApplicationDefinedDegreeOfFreedom")) thecase = 2;*/
111 return thecase;
112}
113
114//=======================================================================
115//function : SetName
116//purpose :
117//=======================================================================
118
119Standard_Boolean StepFEA_DegreeOfFreedomMember::SetName(const Standard_CString name)
120{
121 Standard_Integer numit =0;
122 mycase = CompareNames(name,numit);
123 if(numit) SetInteger(numit);
124 return (mycase >0);
125}
126
127//=======================================================================
128//function : Matches
129//purpose :
130//=======================================================================
131
132Standard_Boolean StepFEA_DegreeOfFreedomMember::Matches(const Standard_CString name) const
133{
134 Standard_Integer numit =0;
135 Standard_Integer thecase =CompareNames(name,numit);
136 return (mycase==thecase);
137}