973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
42cf5bc1 |
14 | |
15 | #include <Standard_Type.hxx> |
16 | #include <StepFEA_SymmetricTensor43dMember.hxx> |
7fd59977 |
17 | #include <TCollection_HAsciiString.hxx> |
18 | |
92efcf78 |
19 | IMPLEMENT_STANDARD_RTTIEXT(StepFEA_SymmetricTensor43dMember,StepData_SelectArrReal) |
20 | |
7fd59977 |
21 | static Standard_CString AST = "ANISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
22 | static Standard_CString IST = "FEA_ISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
23 | static Standard_CString IOST = "FEA_ISO_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D"; |
24 | static Standard_CString TIST = "FEA_TRANSVERSE_ISOTROPIC_SYMMETRIC_TENSOR4_3D"; |
25 | static Standard_CString CNOST = "FEA_COLUMN_NORMALISED_ORTHOTROPIC_SYMMETRIC_TENSOR4_3D"; |
26 | static Standard_CString CNMST = "FEA_COLUMN_NORMALISED_MONOCLINIC_SYMMETRIC_TENSOR4_3D"; |
27 | |
28 | |
29 | //======================================================================= |
30 | //function : StepFEA_SymmetricTensor43dMember |
31 | //purpose : |
32 | //======================================================================= |
33 | |
34 | StepFEA_SymmetricTensor43dMember::StepFEA_SymmetricTensor43dMember () : mycase(0) |
35 | { |
36 | } |
37 | |
38 | |
39 | //======================================================================= |
40 | //function : HasName |
41 | //purpose : |
42 | //======================================================================= |
43 | |
44 | Standard_Boolean StepFEA_SymmetricTensor43dMember::HasName() const |
45 | { |
46 | return mycase>0; |
47 | } |
48 | |
49 | |
50 | //======================================================================= |
51 | //function : Name |
52 | //purpose : |
53 | //======================================================================= |
54 | |
55 | Standard_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 | |
75 | static 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 | |
94 | Standard_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 | |
105 | Standard_Boolean StepFEA_SymmetricTensor43dMember::Matches(const Standard_CString name) const |
106 | { |
107 | Standard_Integer thecase = CompareNames(name); |
108 | return (mycase==thecase); |
109 | } |