X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_Prop.h;h=b9252a8c0b3bd8138aaa0806942e807c3cea5a6d;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=f4ea0138b802d6173fbd213ae8998b83aa8c4036;hpb=32d1a4d19ab1a5d7c172e9660130fcf8ecb1e520;p=modules%2Fshaper.git diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h index f4ea0138b..b9252a8c0 100644 --- a/src/Config/Config_Prop.h +++ b/src/Config/Config_Prop.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Config_Prop.h // Created: 12 Aug 2014 // Author: Vitaly SMETANNIKOV @@ -37,7 +39,8 @@ class Config_Prop Shortcut, ShortcutTree, BiColor, - Background + Background, + Directory }; /** @@ -45,16 +48,17 @@ class Config_Prop * \param theSection - name of section (domain of using) of the property. * \param theName - name (title) of the value. * \param theType - type of the value. - * \param theValue - initial value of the property. + * \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& theValue) + const std::string& theTitle, PropType theType, const std::string& theDefaultValue) { mySection = theSection; myName = theName; myTitle = theTitle; myType = theType; - myValue = theValue; + myValue = theDefaultValue; + myDefaultValue = theDefaultValue; } std::string section() const @@ -90,6 +94,13 @@ class Config_Prop } CONFIG_EXPORT void setValue(const std::string& theValue); + + std::string defaultValue() const + { + return myDefaultValue; + } + + CONFIG_EXPORT void setDefaultValue(const std::string& theValue); bool operator==(const Config_Prop* theProp) const { @@ -102,6 +113,7 @@ class Config_Prop std::string myTitle; PropType myType; std::string myValue; + std::string myDefaultValue; }; typedef std::list Config_Properties;