Uranium
Application Framework
|
Encapsulates Python code that provides a simple value calculation function. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | __call__ |
Call the actual function to calculate the value. More... | |
def | __eq__ |
def | isValid |
Returns whether the function is ready to be executed. More... | |
def | getUsedSettingKeys |
Retrieve a set of the keys (strings) of all the settings used in this function. More... | |
def | __str__ |
def | __repr__ |
def | __getstate__ |
To support Pickle. More... | |
def | __setstate__ |
def | registerOperator |
Expose a custom function to the code executed by SettingFunction. More... | |
Encapsulates Python code that provides a simple value calculation function.
def UM.Settings.SettingFunction.SettingFunction.__init__ | ( | self, | |
code | |||
) |
Constructor.
code | The Python code this function should evaluate. |
def UM.Settings.SettingFunction.SettingFunction.__call__ | ( | self, | |
value_provider | |||
) |
Call the actual function to calculate the value.
def UM.Settings.SettingFunction.SettingFunction.__getstate__ | ( | self, | |
Dict, | |||
str, | |||
Any | |||
) |
To support Pickle.
Pickle does not support the compiled code, so instead remove it from the state. We can re-compile it later on anyway.
def UM.Settings.SettingFunction.SettingFunction.getUsedSettingKeys | ( | self | ) |
Retrieve a set of the keys (strings) of all the settings used in this function.
def UM.Settings.SettingFunction.SettingFunction.isValid | ( | self, | |
bool | |||
) |
Returns whether the function is ready to be executed.
def UM.Settings.SettingFunction.SettingFunction.registerOperator | ( | cls, | |
name | |||
) |
Expose a custom function to the code executed by SettingFunction.
name | What identifier to use in the executed code. |
operator | A callable that implements the actual logic to execute. |