Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / Config / Config_PropManager.h
index 8f36c3500fadc1939c216d02895b8b3e372de9d6..4df2e55635c63d168dfb2156a92802ea6ccf94c2 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        Config_PropManager.h
 // Created:     13 Aug 2014
 // Author:      Vitaly SMETANNIKOV
@@ -13,7 +15,7 @@
 #include <vector>
 
 //! Class wihich let to register properties
-class CONFIG_EXPORT Config_PropManager
+class Config_PropManager
 {
  public:
 
@@ -23,35 +25,38 @@ class CONFIG_EXPORT Config_PropManager
    * \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 theDefValue - default and initial value of the property
    * Returns True if the property succesfully registered
    */
-  static bool registerProp(const std::string& theSection, const std::string& theName,
-                           const std::string& theTitle, Config_Prop::PropType theType,
-                           const std::string& theValue);
+  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 = "");
 
-  static Config_Prop* findProp(const std::string& theSection, const std::string& theName);
+  CONFIG_EXPORT static Config_Prop* findProp(
+    const std::string& theSection, const std::string& theName);
 
-  static Config_Properties getProperties();
+  CONFIG_EXPORT static Config_Properties getProperties();
 
   //! Returns list of registered section names.
-  static std::list<std::string> getSections();
+  CONFIG_EXPORT static std::list<std::string> getSections();
 
   //! Returns list of properties by its owner and section.
-  static Config_Properties getProperties(const std::string& theSection);
+  CONFIG_EXPORT static Config_Properties getProperties(const std::string& theSection);
 
   //! Returns value of the property by its owner, section, and name
-  static std::string string(const std::string& theSection, const std::string& theName,
-                            const std::string& theDefault);
-  static std::vector<int> color(const std::string& theSection, const std::string& theName,
-                                const std::string& theDefault);
-  static int integer(const std::string& theSection, const std::string& theName,
-                     const std::string& theDefault);
-  static double real(const std::string& theSection, const std::string& theName,
-                     const std::string& theDefault);
+  CONFIG_EXPORT static std::string string(
+    const std::string& theSection, const std::string& theName, const std::string& theDefault);
+  
+  CONFIG_EXPORT static std::vector<int> color(
+    const std::string& theSection, const std::string& theName, const std::string& theDefault);
+  
+  CONFIG_EXPORT static int integer(
+    const std::string& theSection, const std::string& theName, const std::string& theDefault);
+  
+  CONFIG_EXPORT static double real(
+    const std::string& theSection, const std::string& theName, const std::string& theDefault);
 
  private:
-  static Config_Properties myProps;
+  CONFIG_EXPORT static Config_Properties myProps;
 };
 
 #endif