The Settings class defines a container of global Manufacturing Toolkit parameters. More...
#include <cadex/Utilities/Settings.hxx>
Public Types | |
| enum class | Id { ConcurrentMode , UserDefined = 10000 } |
| Describes values used to identify Manufacturing Toolkit settings. More... | |
Public Member Functions | |
| void | SetValue (const Id theId, int theVal) |
| Sets integer parameter value. | |
| void | SetValue (const Id theId, double theVal) |
| Sets double parameter value. | |
| void | SetValue (const Id theId, bool theVal) |
| Sets boolean parameter value. | |
| void | SetValue (const Id theId, const UTF16String &theVal) |
| Sets string parameter value. | |
| int | IntValue (const Id theId, int theDefaultVal) const |
| Returns integer parameter value. | |
| double | DoubleValue (const Id theId, double theDefaultVal) const |
| Returns double parameter value. | |
| bool | BoolValue (const Id theId, bool theDefaultVal) const |
| Returns boolean parameter value. | |
| UTF16String | StringValue (const Id theId, const UTF16String &theDefaultVal) const |
| Returns string parameter value. | |
Static Public Member Functions | |
| static Settings | Instance () |
| Returns global settings object. | |
The Settings class defines a container of global Manufacturing Toolkit parameters.
The settings class is a singleton, there is only one object which is returned by Instance().
Parameters can be set with SetValue() and retrieved with respective Value() methods.
Setting support several types of parameters:
Each parameter is given an id specified by the Settings::Id enumeration. To extend with your own id's make sure you use UserDefined value and greater.
|
strong |
| bool cadex::Utilities::Settings::BoolValue | ( | const Id | theId, |
| bool | theDefaultValue ) const |
Returns boolean parameter value.
Returns a bool value for the parameter with theId which has already been registered with SetValue(). If such id has not been registered yet, returns theDefaultValue.
| double cadex::Utilities::Settings::DoubleValue | ( | const Id | theId, |
| double | theDefaultValue ) const |
Returns double parameter value.
Returns a double value for the parameter with theId which has already been registered with SetValue(). If such id has not been registered yet, returns theDefaultValue.
| int cadex::Utilities::Settings::IntValue | ( | const Id | theId, |
| int | theDefaultValue ) const |
Returns integer parameter value.
Returns an integer value for the parameter with theId which has already been registered with SetValue(). If such id has not been registered yet, returns theDefaultValue.
| void cadex::Utilities::Settings::SetValue | ( | const Id | theId, |
| bool | theValue ) |
Sets boolean parameter value.
If the bool parameter with the same id has already been registered, it will be overwritten.
| void cadex::Utilities::Settings::SetValue | ( | const Id | theId, |
| const UTF16String & | theValue ) |
Sets string parameter value.
If the string parameter with the same id has already been registered, it will be overwritten.
| void cadex::Utilities::Settings::SetValue | ( | const Id | theId, |
| double | theValue ) |
Sets double parameter value.
If the double parameter with the same id has already been registered, it will be overwritten.
| void cadex::Utilities::Settings::SetValue | ( | const Id | theId, |
| int | theValue ) |
Sets integer parameter value.
If the integer parameter with the same id has already been registered, it will be overwritten.
| UTF16String cadex::Utilities::Settings::StringValue | ( | const Id | theId, |
| const UTF16String & | theDefaultVal ) const |
Returns string parameter value.
Returns a string value for the parameter with theId which has already been registered with SetValue(). If such id has not been registered yet, returns theDefaultValue.