1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 // Created: 12 Aug 2014
5 // Author: Vitaly SMETANNIKOV
10 #include "Config_def.h"
15 const static char* SKETCH_TAB_NAME = "Sketch";
19 * \brief Class which describes a one property
26 /// Type of stored property
54 * Creates a one property
55 * \param theSection - name of section (domain of using) of the property.
56 * \param theName - name (title) of the value.
57 * \param theTitle - title of the value
58 * \param theType - type of the value.
59 * \param theDefaultValue - default value of the property. This is an initial property value
61 Config_Prop(const std::string& theSection, const std::string& theName,
62 const std::string& theTitle, PropType theType, const std::string& theDefaultValue)
64 mySection = theSection;
68 myValue = theDefaultValue;
69 myDefaultValue = theDefaultValue;
72 /// Get name of section
73 std::string section() const
77 /// Get name of property
78 std::string name() const
82 /// Get title of property
83 std::string title() const
87 /// Set title of property
88 void setTitle(const std::string& theTitle)
92 /// Get type of property
97 /// Set type of property
98 void setType(PropType theType)
102 /// Get property's value in string format
103 std::string value() const
107 /// Set property's value in string format
108 CONFIG_EXPORT void setValue(const std::string& theValue);
109 /// Get default value of property
110 std::string defaultValue() const
112 return myDefaultValue;
114 /// Set default value of property
115 CONFIG_EXPORT void setDefaultValue(const std::string& theValue);
116 /// Alows to compare Config_Prop with each other
117 bool operator==(const Config_Prop* theProp) const
119 return (mySection == theProp->section()) && (myName == theProp->name());
123 std::string mySection; ///< Name of section
124 std::string myName; ///< Name of property
125 std::string myTitle; ///< Title of property
126 PropType myType; ///< Type of property
127 std::string myValue; // Value in string format
128 std::string myDefaultValue; // Default value
131 typedef std::list<Config_Prop*> Config_Properties;