|
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__ (self, other) |
| def | isValid (self) |
| Returns whether the function is ready to be executed. More... | |
| def | getUsedSettingKeys (self) |
| Retrieve a set of the keys (strings) of all the settings used in this function. More... | |
| def | __str__ (self) |
| def | __repr__ (self) |
| def | __getstate__ (self) |
| 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, | |
| FrozenSet, | |||
| str | |||
| ) |
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. |