1 // Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SALOMEDSImpl_GenericVariable.cxx
21 // Author : Roman NIKOLAEV, Open CASCADE S.A.S.
24 #include "SALOMEDSImpl_GenericVariable.hxx"
25 #include "SALOMEDSImpl_Attributes.hxx"
26 #include "SALOMEDSImpl_Study.hxx"
33 //============================================================================
34 /*! Function : SALOMEDSImpl_GenericVariable
37 //============================================================================
38 SALOMEDSImpl_GenericVariable::
39 SALOMEDSImpl_GenericVariable(SALOMEDSImpl_GenericVariable::VariableTypes theType,
40 const string& theName):
45 //============================================================================
46 /*! Function : ~SALOMEDSImpl_GenericVariable
49 //============================================================================
50 SALOMEDSImpl_GenericVariable::~SALOMEDSImpl_GenericVariable()
53 //============================================================================
57 //============================================================================
58 SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::Type() const
63 //============================================================================
67 //============================================================================
68 string SALOMEDSImpl_GenericVariable::Name() const
73 //============================================================================
74 /*! Function : setType
77 //============================================================================
78 bool SALOMEDSImpl_GenericVariable::setType(const SALOMEDSImpl_GenericVariable::VariableTypes theType)
87 //============================================================================
88 /*! Function : setName
91 //============================================================================
92 bool SALOMEDSImpl_GenericVariable::setName(const std::string& theName)
94 if(_name.compare(theName) == 0)
101 //============================================================================
102 /*! Function : String2VariableType
105 //============================================================================
106 SALOMEDSImpl_GenericVariable::VariableTypes SALOMEDSImpl_GenericVariable::String2VariableType(const string& theStrType)
108 return(SALOMEDSImpl_GenericVariable::VariableTypes)atoi((char*)theStrType.c_str());
111 //============================================================================
115 //============================================================================
116 string SALOMEDSImpl_GenericVariable::Save() const
122 //============================================================================
123 /*! Function : SaveToScript
126 //============================================================================
127 string SALOMEDSImpl_GenericVariable::SaveToScript() const
131 //============================================================================
132 /*! Function : SaveType
135 //============================================================================
136 string SALOMEDSImpl_GenericVariable::SaveType() const
141 //============================================================================
145 //============================================================================
146 void SALOMEDSImpl_GenericVariable::Load(const string& theStrValue)