Back to index

salome-kernel  6.5.0
SALOMEDSImpl_IParameters.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef SALOMEDSImpl_IParameters_H
00024 #define SALOMEDSImpl_IParameters_H
00025 
00026 #include "SALOMEDSImpl_Defines.hxx"
00027 #include <string>
00028 #include <vector>
00029 #include <map>
00030 
00031 #include "SALOMEDSImpl_AttributeParameter.hxx"
00032 #include "SALOMEDSImpl_Study.hxx"
00033 
00037 class  SALOMEDSIMPL_EXPORT SALOMEDSImpl_IParameters
00038 {
00039 public:
00040   SALOMEDSImpl_IParameters(SALOMEDSImpl_AttributeParameter* ap); 
00041 
00042   virtual ~SALOMEDSImpl_IParameters();
00043 
00049   virtual int append(const std::string& listName, const std::string& value); 
00050 
00054   virtual int nbValues(const std::string& listName);
00055 
00059   virtual std::vector<std::string> getValues(const std::string& listName);
00060 
00064   virtual std::string getValue(const std::string& listName, int index);
00065 
00069   virtual std::vector<std::string> getLists();
00070 
00074   virtual void setParameter(const std::string& entry, const std::string& parameterName, const std::string& value);
00075 
00079   virtual std::string getParameter(const std::string& entry, const std::string& parameterName);
00080 
00084   virtual void setIdParameter(const std::string& entry, const std::string& value);
00085 
00089   virtual std::string getIdParameter(const std::string& entry);
00090 
00094   virtual std::vector<std::string> getAllParameterNames(const std::string& entry);
00095 
00099   virtual std::vector<std::string> getAllParameterValues(const std::string& entry);
00100 
00104   virtual int getNbParameters(const std::string& entry);
00105 
00109   virtual std::vector<std::string> getEntries();
00110 
00114   virtual void setProperty(const std::string& name, const std::string& value);
00115 
00119   virtual std::string getProperty(const std::string& name);
00120 
00124   virtual std::vector<std::string> getProperties();
00125 
00129   virtual std::string decodeEntry(const std::string& entry);
00130 
00131 
00135   static bool isDumpPython(SALOMEDSImpl_Study* study, const std::string& theID = "");  
00136 
00140   static int getLastSavePoint(SALOMEDSImpl_Study* study, const std::string& theID = "");
00141 
00145   static std::string getStudyScript(SALOMEDSImpl_Study* study, int savePoint, const std::string& theID = "");
00146 
00151   static std::string getDefaultScript(SALOMEDSImpl_Study* study, 
00152     const std::string& moduleName, 
00153     const std::string& shift,
00154     const std::string& theID = "");
00155 
00159   static std::string getDefaultVisualComponent();
00160 
00161 private:
00162   SALOMEDSImpl_AttributeParameter* _ap;
00163   SALOMEDSImpl_Study* _study;
00164   std::map<std::string, std::string> _compNames;
00165 };
00166 
00167 
00168 #endif