20 #ifndef Config_PropManager_H
21 #define Config_PropManager_H
23 #include "Config_def.h"
24 #include "Config_Prop.h"
51 const std::string& theName,
53 const std::string& theDefValue =
"",
54 const std::string& theMin =
"",
55 const std::string& theMax =
"");
59 const std::string& theSection,
const std::string& theName);
65 CONFIG_EXPORT
static std::list<std::string>
getSections();
68 CONFIG_EXPORT
static Config_Properties
getProperties(
const std::string& theSection);
71 CONFIG_EXPORT
static std::string
string(
const std::string& theSection,
72 const std::string& theName);
74 CONFIG_EXPORT
static std::vector<int>
color(
const std::string& theSection,
75 const std::string& theName);
77 CONFIG_EXPORT
static int integer(
const std::string& theSection,
78 const std::string& theName);
80 CONFIG_EXPORT
static double real(
const std::string& theSection,
81 const std::string& theName);
83 CONFIG_EXPORT
static bool boolean(
const std::string& theSection,
84 const std::string& theName);
90 CONFIG_EXPORT
static double stringToDouble(
const std::string& theDouble);
101 CONFIG_EXPORT
static bool autoColorStatus;
103 CONFIG_EXPORT
static Config_Properties& props();
Class which let to register properties.
Definition: Config_PropManager.h:36
static int integer(const std::string &theSection, const std::string &theName)
Returns integer by given section and name.
Definition: Config_PropManager.cpp:150
static void setAutoColorStatus(const bool theValue)
Set Auto-color boolean value.
Definition: Config_PropManager.cpp:38
static double stringToDouble(const std::string &theDouble)
Returns conversion of the string to double value.
Definition: Config_PropManager.cpp:216
static Config_Prop * findProp(const std::string &theSection, const std::string &theName)
Finds property in the given section by the given name, if property not found returns NULL.
Definition: Config_PropManager.cpp:77
static std::string string(const std::string &theSection, const std::string &theName)
Returns value of the property by its owner, section, and name.
Definition: Config_PropManager.cpp:130
static bool getAutoColorStatus()
Returns Auto-color status as a Boolean.
Definition: Config_PropManager.cpp:33
static std::list< std::string > getSections()
Returns list of registered section names.
Definition: Config_PropManager.cpp:102
static double real(const std::string &theSection, const std::string &theName)
Returns real by given section and name.
Definition: Config_PropManager.cpp:156
static Config_Prop * registerProp(const std::string &theSection, const std::string &theName, const std::string &theTitle, Config_Prop::PropType theType, const std::string &theDefValue="", const std::string &theMin="", const std::string &theMax="")
Registers property parameters.
Definition: Config_PropManager.cpp:43
static std::vector< int > color(const std::string &theSection, const std::string &theName)
Returns color by given section and name as 3-element vector {r,g,b}.
Definition: Config_PropManager.cpp:143
static bool boolean(const std::string &theSection, const std::string &theName)
Returns boolean by given section and name.
Definition: Config_PropManager.cpp:162
static Config_Properties getProperties()
Returns std::list of all existing properties.
Definition: Config_PropManager.cpp:89
Class which describes a one property.
Definition: Config_Prop.h:36
PropType
Type of stored property.
Definition: Config_Prop.h:41