Integration of OCCT 6.5.0 from SVN
[occt.git] / src / StepFEA / StepFEA_SymmetricTensor23dMember.cxx
CommitLineData
7fd59977 1// File: StepFEA_SymmetricTensor23dMember.cxx
2// Created: Tue Dec 10 18:13:00 2002
3// Author: data exchange team
4// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
5// Copyright: Open CASCADE 2002
6
7#include <StepFEA_SymmetricTensor23dMember.ixx>
8#include <TCollection_HAsciiString.hxx>
9
10static Standard_CString IST = "ISOTROPIC_SYMMETRIC_TENSOR2_3D";
11static Standard_CString OST = "ORTHOTROPIC_SYMMETRIC_TENSOR2_3D";
12static Standard_CString AST = "ANISOTROPIC_SYMMETRIC_TENSOR2_3D";
13
14//=======================================================================
15//function : StepFEA_SymmetricTensor23dMember
16//purpose :
17//=======================================================================
18
19StepFEA_SymmetricTensor23dMember::StepFEA_SymmetricTensor23dMember () : mycase(0)
20{
21}
22
23//=======================================================================
24//function : HasName
25//purpose :
26//=======================================================================
27
28Standard_Boolean StepFEA_SymmetricTensor23dMember::HasName() const
29{
30 return mycase >0;
31}
32
33//=======================================================================
34//function : Name
35//purpose :
36//=======================================================================
37
38Standard_CString StepFEA_SymmetricTensor23dMember::Name() const
39{
40 switch(mycase) {
41 case 1 : return IST;
42 case 2 : return OST;
43 case 3 : return AST;
44 default : break;
45 }
46 return "";
47}
48
49//=======================================================================
50//function : CompareNames
51//purpose :
52//=======================================================================
53
54static Standard_Integer CompareNames(const Standard_CString name)
55{
56 Standard_Integer thecase = 0;
57 if (!name || name[0] == '\0') thecase = 0;
58 else if(!strcmp (name,IST)) thecase = 1;
59 else if(!strcmp (name,OST)) thecase = 2;
60 else if(!strcmp (name,AST)) thecase = 3;
61 return thecase;
62}
63
64//=======================================================================
65//function : SetName
66//purpose :
67//=======================================================================
68
69Standard_Boolean StepFEA_SymmetricTensor23dMember::SetName(const Standard_CString name)
70{
71 mycase = CompareNames(name);
72 return (mycase >0);
73}
74
75//=======================================================================
76//function : Matches
77//purpose :
78//=======================================================================
79
80Standard_Boolean StepFEA_SymmetricTensor23dMember::Matches(const Standard_CString name) const
81{
82 Standard_Integer thecase = CompareNames(name);
83 return (mycase==thecase);
84}