X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_PropManager.h;h=40e2f762a6be1c7fcb016a08c9102b8bcc7f3627;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=d650b0e387c6b54dfeacde5d01b2828d5b4a1cae;hpb=1b587c92a6855e2bd217a65bb0295d0fd720e77d;p=modules%2Fshaper.git diff --git a/src/Config/Config_PropManager.h b/src/Config/Config_PropManager.h index d650b0e38..40e2f762a 100644 --- a/src/Config/Config_PropManager.h +++ b/src/Config/Config_PropManager.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Config_PropManager.h // Created: 13 Aug 2014 // Author: Vitaly SMETANNIKOV @@ -12,54 +14,49 @@ #include #include -//! Class wihich let to register properties -class CONFIG_EXPORT Config_PropManager +//! Class which let to register properties +class Config_PropManager { -public: + public: /** - * Registers property parameters - * \param theOwnerId - name of owner (name of plugin for example) - * \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 - * 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); - - static Config_Prop* findProp(const std::string& theSection, - const std::string& theName); - - static Config_Properties getProperties(); + * Registers property parameters + * \param theOwnerId - name of owner (name of plugin for example) + * \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 theDefValue - default and initial value of the property + * Returns True if the property succesfully registered + */ + 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 = ""); + + CONFIG_EXPORT static Config_Prop* findProp( + const std::string& theSection, const std::string& theName); + + CONFIG_EXPORT static Config_Properties getProperties(); //! Returns list of registered section names. - static std::list getSections(); + CONFIG_EXPORT static std::list 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 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); - -private: - static Config_Properties myProps; + CONFIG_EXPORT static std::string string( + const std::string& theSection, const std::string& theName, const std::string& theDefault); + + CONFIG_EXPORT static std::vector 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: + CONFIG_EXPORT static Config_Properties myProps; }; - -#endif \ No newline at end of file +#endif