X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_PropManager.h;h=23e577666189ab3df82236709a3ee4c4adb89735;hb=5afcc18216ad228eafcaf632c5008d1aebd3122e;hp=60e32f58967e6fbe46575f109508b2d0141e04e6;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/Config/Config_PropManager.h b/src/Config/Config_PropManager.h index 60e32f589..23e577666 100644 --- a/src/Config/Config_PropManager.h +++ b/src/Config/Config_PropManager.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef Config_PropManager_H @@ -44,19 +43,27 @@ class Config_PropManager * \param theTitle - title of the value. * \param theType - type of the value. * \param theDefValue - default and initial value of the property + * \param theMin - minimal value + * \param theMax - maximal value * Returns True if the property succesfully registered */ CONFIG_EXPORT static Config_Prop* registerProp(const std::string& theSection, const std::string& theName, const std::string& theTitle, Config_Prop::PropType theType, - const std::string& theDefValue = ""); + const std::string& theDefValue = "", + const std::string& theMin = "", + const std::string& theMax = ""); + //! Finds property in the given section by the given name, if property not found returns NULL CONFIG_EXPORT static Config_Prop* findProp( const std::string& theSection, const std::string& theName); + //! Returns std::list of all existing properies CONFIG_EXPORT static Config_Properties getProperties(); + //! Returns list of registered section names. CONFIG_EXPORT static std::list getSections(); + //! Returns list of properties by its owner and section. CONFIG_EXPORT static Config_Properties getProperties(const std::string& theSection); @@ -74,7 +81,8 @@ class Config_PropManager const std::string& theName); //! Returns boolean by given section and name CONFIG_EXPORT static bool boolean(const std::string& theSection, - const std::string& theName); + const std::string& theName); + //! Returns convertion of the string to double value. Temporary changes locale to process //! values contained "," or "." separator. //! \param theDouble a value to be converted @@ -82,7 +90,7 @@ class Config_PropManager CONFIG_EXPORT static double stringToDouble(const std::string& theDouble); private: - CONFIG_EXPORT static Config_Properties myProps; ///< List of all stored properties + CONFIG_EXPORT static Config_Properties& props(); ///< List of all stored properties }; #endif