Salome HOME
Merge from V6_main 01/04/2013
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_GenericVariable.cxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : SALOMEDSImpl_GenericVariable.cxx
21 //  Author : Roman NIKOLAEV, Open CASCADE S.A.S.
22 //  Module : SALOME
23 //
24 #include "SALOMEDSImpl_GenericVariable.hxx"
25 #include "SALOMEDSImpl_Attributes.hxx"
26 #include "SALOMEDSImpl_Study.hxx"
27
28 #include <string>
29
30
31 //============================================================================
32 /*! Function : SALOMEDSImpl_GenericVariable
33  *  Purpose  : 
34  */
35 //============================================================================
36 SALOMEDSImpl_GenericVariable::
37 SALOMEDSImpl_GenericVariable(SALOMEDSImpl_GenericVariable::VariableTypes theType,
38                              const std::string& theName): 
39   _type(theType),
40   _name(theName)
41 {}
42
43 //============================================================================
44 /*! Function : ~SALOMEDSImpl_GenericVariable
45  *  Purpose  : 
46  */
47 //============================================================================
48 SALOMEDSImpl_GenericVariable::~SALOMEDSImpl_GenericVariable()
49 {}
50
51 //============================================================================
52 /*! Function : Type
53  *  Purpose  : 
54  */
55 //============================================================================
56 SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::Type() const
57 {
58   return _type;
59 }
60
61 //============================================================================
62 /*! Function : Name
63  *  Purpose  : 
64  */
65 //============================================================================
66 std::string SALOMEDSImpl_GenericVariable::Name() const
67 {
68   return _name;
69 }
70
71 //============================================================================
72 /*! Function : setType
73  *  Purpose  : 
74  */
75 //============================================================================
76 bool SALOMEDSImpl_GenericVariable::setType(const SALOMEDSImpl_GenericVariable::VariableTypes theType)
77 {
78   if(_type == theType)
79     return false;
80
81   _type = theType;
82   return true;
83 }
84
85 //============================================================================
86 /*! Function : setName
87  *  Purpose  : 
88  */
89 //============================================================================
90 bool SALOMEDSImpl_GenericVariable::setName(const std::string& theName)
91 {
92   if(_name.compare(theName) == 0)
93     return false;
94
95   _name = theName;
96   return true;
97 }
98
99 //============================================================================
100 /*! Function : String2VariableType
101  *  Purpose  : 
102  */
103 //============================================================================
104 SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::String2VariableType(const std::string& theStrType)
105 {
106   return(SALOMEDSImpl_GenericVariable::VariableTypes)atoi((char*)theStrType.c_str());
107 }
108
109 //============================================================================
110 /*! Function : Save
111  *  Purpose  : 
112  */
113 //============================================================================
114 std::string SALOMEDSImpl_GenericVariable::Save() const
115 {
116   return std::string();
117 }
118
119
120 //============================================================================
121 /*! Function : SaveToScript
122  *  Purpose  : 
123  */
124 //============================================================================
125 std::string SALOMEDSImpl_GenericVariable::SaveToScript() const
126 {
127   return std::string();
128 }
129 //============================================================================
130 /*! Function : SaveType
131  *  Purpose  : 
132  */
133 //============================================================================
134 std::string SALOMEDSImpl_GenericVariable::SaveType() const
135 {
136   return std::string();
137 }
138
139 //============================================================================
140 /*! Function : Load
141  *  Purpose  : 
142  */
143 //============================================================================
144 void SALOMEDSImpl_GenericVariable::Load(const std::string& theStrValue)
145 {
146 }