-// 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
//
// 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef CONFIG_PROP_H
* \param theDefaultValue - default value of the property. This is an initial property value
*/
Config_Prop(const std::string& theSection, const std::string& theName,
- const std::string& theTitle, PropType theType, const std::string& theDefaultValue)
+ const std::string& theTitle, PropType theType,
+ const std::string& theDefaultValue,
+ const std::string& theMin, const std::string& theMax)
{
mySection = theSection;
myName = theName;
myType = theType;
myValue = theDefaultValue;
myDefaultValue = theDefaultValue;
+ myMin = theMin;
+ myMax = theMax;
}
/// Get name of section
return (mySection == theProp->section()) && (myName == theProp->name());
}
+ /// Returns minimal value
+ std::string min() const { return myMin; }
+
+ void setMin(const std::string& theMin) {
+ myMin = theMin;
+ }
+
+ /// Returns maximal value
+ std::string max() const { return myMax; }
+
+ void setMax(const std::string& theMax) {
+ myMax = theMax;
+ }
+
private:
std::string mySection; ///< Name of section
std::string myName; ///< Name of property
PropType myType; ///< Type of property
std::string myValue; // Value in string format
std::string myDefaultValue; // Default value
+ std::string myMin; // Minimal value
+ std::string myMax; // Maximal value
};
typedef std::list<Config_Prop*> Config_Properties;