b311480e |
1 | // Created on: 2002-12-10 |
2 | // Created by: data exchange team |
973c2be1 |
3 | // Copyright (c) 2002-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
7fd59977 |
16 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 |
7fd59977 |
17 | |
42cf5bc1 |
18 | #include <Standard_Type.hxx> |
19 | #include <StepFEA_SymmetricTensor23dMember.hxx> |
7fd59977 |
20 | #include <TCollection_HAsciiString.hxx> |
21 | |
92efcf78 |
22 | IMPLEMENT_STANDARD_RTTIEXT(StepFEA_SymmetricTensor23dMember,StepData_SelectArrReal) |
23 | |
7fd59977 |
24 | static Standard_CString IST = "ISOTROPIC_SYMMETRIC_TENSOR2_3D"; |
25 | static Standard_CString OST = "ORTHOTROPIC_SYMMETRIC_TENSOR2_3D"; |
26 | static Standard_CString AST = "ANISOTROPIC_SYMMETRIC_TENSOR2_3D"; |
27 | |
28 | //======================================================================= |
29 | //function : StepFEA_SymmetricTensor23dMember |
30 | //purpose : |
31 | //======================================================================= |
32 | |
33 | StepFEA_SymmetricTensor23dMember::StepFEA_SymmetricTensor23dMember () : mycase(0) |
34 | { |
35 | } |
36 | |
37 | //======================================================================= |
38 | //function : HasName |
39 | //purpose : |
40 | //======================================================================= |
41 | |
42 | Standard_Boolean StepFEA_SymmetricTensor23dMember::HasName() const |
43 | { |
44 | return mycase >0; |
45 | } |
46 | |
47 | //======================================================================= |
48 | //function : Name |
49 | //purpose : |
50 | //======================================================================= |
51 | |
52 | Standard_CString StepFEA_SymmetricTensor23dMember::Name() const |
53 | { |
54 | switch(mycase) { |
55 | case 1 : return IST; |
56 | case 2 : return OST; |
57 | case 3 : return AST; |
58 | default : break; |
59 | } |
60 | return ""; |
61 | } |
62 | |
63 | //======================================================================= |
64 | //function : CompareNames |
65 | //purpose : |
66 | //======================================================================= |
67 | |
68 | static Standard_Integer CompareNames(const Standard_CString name) |
69 | { |
70 | Standard_Integer thecase = 0; |
71 | if (!name || name[0] == '\0') thecase = 0; |
72 | else if(!strcmp (name,IST)) thecase = 1; |
73 | else if(!strcmp (name,OST)) thecase = 2; |
74 | else if(!strcmp (name,AST)) thecase = 3; |
75 | return thecase; |
76 | } |
77 | |
78 | //======================================================================= |
79 | //function : SetName |
80 | //purpose : |
81 | //======================================================================= |
82 | |
83 | Standard_Boolean StepFEA_SymmetricTensor23dMember::SetName(const Standard_CString name) |
84 | { |
85 | mycase = CompareNames(name); |
86 | return (mycase >0); |
87 | } |
88 | |
89 | //======================================================================= |
90 | //function : Matches |
91 | //purpose : |
92 | //======================================================================= |
93 | |
94 | Standard_Boolean StepFEA_SymmetricTensor23dMember::Matches(const Standard_CString name) const |
95 | { |
96 | Standard_Integer thecase = CompareNames(name); |
97 | return (mycase==thecase); |
98 | } |