Back to index

salome-kernel  6.5.0
SALOMEDSImpl_ScalarVariable.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  File   : SALOMEDSImpl_ScalarVariable.hxx
00021 //  Author : Roman NIKOLAEV, Open CASCADE S.A.S.
00022 //  Module : SALOME
00023 //
00024 #ifndef _SALOMEDSImpl_ScalarVariable_HeaderFile
00025 #define _SALOMEDSImpl_ScalarVariable_HeaderFile
00026 
00027 #include "SALOMEDSImpl_Defines.hxx"
00028 #include "SALOMEDSImpl_GenericVariable.hxx"
00029 
00030 class SALOMEDSIMPL_EXPORT SALOMEDSImpl_ScalarVariable : 
00031   public SALOMEDSImpl_GenericVariable 
00032 {
00033 public:
00034   SALOMEDSImpl_ScalarVariable(SALOMEDSImpl_GenericVariable::VariableTypes theType,
00035                               const std::string& theName);
00036   ~SALOMEDSImpl_ScalarVariable();
00037   
00038   bool setValue(const double theValue);
00039   double getValue() const;
00040 
00041   bool setStringValue(const std::string& theValue);
00042   std::string getStringValue() const;
00043 
00044   virtual std::string Save() const;
00045   virtual std::string SaveToScript() const;
00046   virtual std::string SaveType() const;
00047 
00048   virtual void Load(const std::string& theStrValue);
00049 
00050 private:
00051   double myValue;
00052   std::string myStrValue;
00053 };
00054 
00055 
00056 #endif //_SALOMEDSImpl_ScalarVariable_HeaderFile