X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_Prop.h;h=b24e422789cd86d197b76000dad3ccec783fae76;hb=e32f95642855a63da2727cb324ce2a75632a712f;hp=b9252a8c0b3bd8138aaa0806942e807c3cea5a6d;hpb=7bf19255421b34594c7b0a76d0ce28166d0ce895;p=modules%2Fshaper.git diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h index b9252a8c0..b24e42278 100644 --- a/src/Config/Config_Prop.h +++ b/src/Config/Config_Prop.h @@ -4,24 +4,29 @@ // Created: 12 Aug 2014 // Author: Vitaly SMETANNIKOV -#ifndef Config_Prop_H -#define Config_Prop_H +#ifndef CONFIG_PROP_H +#define CONFIG_PROP_H #include "Config_def.h" #include #include -/// Class which describes a one property +/*! + * \class Config_Prop + * \brief Class which describes a one property + * \ingroup Config + */ class Config_Prop { public: + /// Type of stored property enum PropType { Disabled, Space, - Bool, + Boolean, Color, String, Selector, @@ -47,6 +52,7 @@ class Config_Prop * Creates a one property * \param theSection - name of section (domain of using) of the property. * \param theName - name (title) of the value. + * \param theTitle - title of the value * \param theType - type of the value. * \param theDefaultValue - default value of the property. This is an initial property value */ @@ -61,59 +67,63 @@ class Config_Prop myDefaultValue = theDefaultValue; } + /// Get name of section std::string section() const { return mySection; } + /// Get name of property std::string name() const { return myName; } - + /// Get title of property std::string title() const { return myTitle; } + /// Set title of property void setTitle(const std::string& theTitle) { myTitle = theTitle; } - + /// Get type of property PropType type() const { return myType; } + /// Set type of property void setType(PropType theType) { myType = theType; } - + /// Get property's value in string format std::string value() const { return myValue; } - + /// Set property's value in string format CONFIG_EXPORT void setValue(const std::string& theValue); - + /// Get default value of property std::string defaultValue() const { return myDefaultValue; } - + /// Set default value of property CONFIG_EXPORT void setDefaultValue(const std::string& theValue); - + /// Alows to compare Config_Prop with each other bool operator==(const Config_Prop* theProp) const { return (mySection == theProp->section()) && (myName == theProp->name()); } private: - std::string mySection; - std::string myName; - std::string myTitle; - PropType myType; - std::string myValue; - std::string myDefaultValue; + std::string mySection; ///< Name of section + std::string myName; ///< Name of property + std::string myTitle; ///< Title of property + PropType myType; ///< Type of property + std::string myValue; // Value in string format + std::string myDefaultValue; // Default value }; typedef std::list Config_Properties;