7fd59977 |
1 | #include <StepFEA_SymmetricTensor43dMember.ixx> |
2 | #include <TCollection_HAsciiString.hxx> |
3 | |
4 | static Standard_CString AST = "ANISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
5 | static Standard_CString IST = "FEA_ISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
6 | static Standard_CString IOST = "FEA_ISO_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D"; |
7 | static Standard_CString TIST = "FEA_TRANSVERSE_ISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
8 | static Standard_CString CNOST = "FEA_COLUMN_NORMALISED_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D"; |
9 | static Standard_CString CNMST = "FEA_COLUMN_NORMALISED_MONOCLINIC_SYMMETRIC_TENSOR4_3D"; |
10 | |
11 | |
12 | //======================================================================= |
13 | //function : StepFEA_SymmetricTensor43dMember |
14 | //purpose : |
15 | //======================================================================= |
16 | |
17 | StepFEA_SymmetricTensor43dMember::StepFEA_SymmetricTensor43dMember () : mycase(0) |
18 | { |
19 | } |
20 | |
21 | |
22 | //======================================================================= |
23 | //function : HasName |
24 | //purpose : |
25 | //======================================================================= |
26 | |
27 | Standard_Boolean StepFEA_SymmetricTensor43dMember::HasName() const |
28 | { |
29 | return mycase>0; |
30 | } |
31 | |
32 | |
33 | //======================================================================= |
34 | //function : Name |
35 | //purpose : |
36 | //======================================================================= |
37 | |
38 | Standard_CString StepFEA_SymmetricTensor43dMember::Name() const |
39 | { |
40 | switch(mycase) { |
41 | case 1 : return AST; |
42 | case 2 : return IST; |
43 | case 3 : return IOST; |
44 | case 4 : return TIST; |
45 | case 5 : return CNOST; |
46 | case 6 : return CNMST; |
47 | default : break; |
48 | } |
49 | return ""; |
50 | } |
51 | |
52 | |
53 | //======================================================================= |
54 | //function : CompareNames |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | static Standard_Integer CompareNames(const Standard_CString name) |
59 | { |
60 | Standard_Integer thecase =0; |
61 | if (!name || name[0] == '\0') thecase = 0; |
62 | else if(!strcmp (name,AST)) thecase = 1; |
63 | else if(!strcmp (name,IST)) thecase = 2; |
64 | else if(!strcmp (name,IOST)) thecase = 3; |
65 | else if(!strcmp (name,TIST)) thecase = 4; |
66 | else if(!strcmp (name,CNOST)) thecase = 5; |
67 | else if(!strcmp (name,CNMST)) thecase = 6; |
68 | return thecase; |
69 | } |
70 | |
71 | |
72 | //======================================================================= |
73 | //function : SetName |
74 | //purpose : |
75 | //======================================================================= |
76 | |
77 | Standard_Boolean StepFEA_SymmetricTensor43dMember::SetName(const Standard_CString name) |
78 | { |
79 | mycase = CompareNames(name); |
80 | return (mycase >0); |
81 | } |
82 | |
83 | //======================================================================= |
84 | //function : Matches |
85 | //purpose : |
86 | //======================================================================= |
87 | |
88 | Standard_Boolean StepFEA_SymmetricTensor43dMember::Matches(const Standard_CString name) const |
89 | { |
90 | Standard_Integer thecase = CompareNames(name); |
91 | return (mycase==thecase); |
92 | } |