SHAPER  9.12.0
Config_PropManager Class Reference

Class which let to register properties. More...

Static Public Member Functions

static Config_PropregisterProp (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. More...
 
static Config_PropfindProp (const std::string &theSection, const std::string &theName)
 Finds property in the given section by the given name, if property not found returns NULL. More...
 
static Config_Properties getProperties ()
 Returns std::list of all existing properies. More...
 
static std::list< std::string > getSections ()
 Returns list of registered section names. More...
 
static Config_Properties getProperties (const std::string &theSection)
 Returns list of properties by its owner and section. More...
 
static std::string string (const std::string &theSection, const std::string &theName)
 Returns value of the property by its owner, section, and name. More...
 
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}. More...
 
static int integer (const std::string &theSection, const std::string &theName)
 Returns integer by given section and name. More...
 
static double real (const std::string &theSection, const std::string &theName)
 Returns real by given section and name. More...
 
static bool boolean (const std::string &theSection, const std::string &theName)
 Returns boolean by given section and name. More...
 
static double stringToDouble (const std::string &theDouble)
 Returns convertion of the string to double value. More...
 
static bool getAutoColorStatus ()
 Returns Auto-color status as a Boolean. More...
 
static void setAutoColorStatus (const bool theValue)
 Set Auto-color boolean value. More...
 

Detailed Description

Class which let to register properties.

Member Function Documentation

◆ registerProp()

Config_Prop * Config_PropManager::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 = "" 
)
static

Registers property parameters.

Parameters
theSection- name of section (domain of using) of the property.
theName- name (title) of the value.
theTitle- title of the value.
theType- type of the value.
theDefValue- default and initial value of the property
theMin- minimal value
theMax- maximal value Returns True if the property succesfully registered

◆ findProp()

Config_Prop * Config_PropManager::findProp ( const std::string &  theSection,
const std::string &  theName 
)
static

Finds property in the given section by the given name, if property not found returns NULL.

◆ getProperties() [1/2]

Config_Properties Config_PropManager::getProperties ( )
static

Returns std::list of all existing properies.

◆ getSections()

std::list< std::string > Config_PropManager::getSections ( )
static

Returns list of registered section names.

◆ getProperties() [2/2]

Config_Properties Config_PropManager::getProperties ( const std::string &  theSection)
static

Returns list of properties by its owner and section.

◆ string()

std::string Config_PropManager::string ( const std::string &  theSection,
const std::string &  theName 
)
static

Returns value of the property by its owner, section, and name.

◆ color()

std::vector< int > Config_PropManager::color ( const std::string &  theSection,
const std::string &  theName 
)
static

Returns color by given section and name as 3-element vector {r,g,b}.

◆ integer()

int Config_PropManager::integer ( const std::string &  theSection,
const std::string &  theName 
)
static

Returns integer by given section and name.

◆ real()

double Config_PropManager::real ( const std::string &  theSection,
const std::string &  theName 
)
static

Returns real by given section and name.

◆ boolean()

bool Config_PropManager::boolean ( const std::string &  theSection,
const std::string &  theName 
)
static

Returns boolean by given section and name.

◆ stringToDouble()

double Config_PropManager::stringToDouble ( const std::string &  theDouble)
static

Returns convertion of the string to double value.

Temporary changes locale to process values contained "," or "." separator.

Parameters
theDoublea value to be converted
Returns
double result or zero

◆ getAutoColorStatus()

bool Config_PropManager::getAutoColorStatus ( )
static

Returns Auto-color status as a Boolean.

◆ setAutoColorStatus()

void Config_PropManager::setAutoColorStatus ( const bool  theValue)
static

Set Auto-color boolean value.

Parameters
theValuea value to use