Hide menu
Loading...
Searching...
No Matches
manufacturingtoolkit.CadExMTK.Utilities_Settings Class Reference

Settings Settings.hxx cadex/Utilities/Settings.hxx. More...

Inheritance diagram for manufacturingtoolkit.CadExMTK.Utilities_Settings:

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 SetValue (self, *args)
 Overload 1: Sets integer parameter value.
 
 IntValue (self, theId, theDefaultVal)
 Returns integer parameter value.
 
 DoubleValue (self, theId, theDefaultVal)
 Returns double parameter value.
 
 BoolValue (self, theId, theDefaultVal)
 Returns boolean parameter value.
 
 StringValue (self, theId, theDefaultVal)
 Returns string parameter value.
 

Static Public Attributes

 Id_ConcurrentMode = _CadExMTK.Utilities_Settings_Id_ConcurrentMode
 
 Id_UserDefined = _CadExMTK.Utilities_Settings_Id_UserDefined
 

Detailed Description

Settings Settings.hxx cadex/Utilities/Settings.hxx.

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.

Warning
Do not rely on preservation of id's from between Manufacturing Toolkit versions (except UserDefined value). As new ids appear they may be inserted between existing ones.
using namespace Utilities;
auto& aSettings = Settings::Instance();
auto aUserValueId = Settings::Id (static_cast<int> (Settings::Id::UserDefined) + 2);
aSettings.SetValue (aUserValueId, 0.5);
bool anIsConcurrent = aSettings.BoolValue (Settings::Id::ConcurrentMode, true);

Member Function Documentation

◆ SetValue()

manufacturingtoolkit.CadExMTK.Utilities_Settings.SetValue ( self,
* args )

Overload 1: Sets integer parameter value.

|

Overload 2: Sets double parameter value. |

Overload 3: Sets boolean parameter value. |

Overload 4: Sets string parameter value.

◆ StringValue()

manufacturingtoolkit.CadExMTK.Utilities_Settings.StringValue ( self,
theId,
theDefaultVal )

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.


The documentation for this class was generated from the following file:
  • CadExMTK.py