This class defines a status variable that is loaded before activation and saved after deactivation.
More...
|
|
| var_name |
| |
|
| name |
| |
|
| constructor_function |
| |
|
| representer_function |
| |
|
| default |
| |
This class defines a status variable that is loaded before activation and saved after deactivation.
◆ __init__()
| def core.module.StatusVar.__init__ |
( |
|
self, |
|
|
|
name = None, |
|
|
|
default = None, |
|
|
|
var_name = None, |
|
|
|
constructor = None, |
|
|
|
representer = None |
|
) |
| |
- Parameters
-
| name | identifier of the status variable when stored |
| default | default value for the status variable when a saved version is not present |
| constructor | constructor function for variable, do loading type checks or conversion here |
| representer | representer function for status variable, do saving conversion here |
| var_name | name of the variable inside a running module. Only set this if you know what you are doing! |
◆ constructor()
| def core.module.StatusVar.constructor |
( |
|
self, |
|
|
|
func |
|
) |
| |
This is the decorator for declaring constructor function for this StatusVar.
- Parameters
-
- Returns
- : return the original function so this can be used as a decorator
◆ copy()
| def core.module.StatusVar.copy |
( |
|
self, |
|
|
|
kwargs |
|
) |
| |
Create a new instance of StatusVar with copied and updated values.
- Parameters
-
| kwargs | Additional or overridden parameters for the constructor of this class |
◆ representer()
| def core.module.StatusVar.representer |
( |
|
self, |
|
|
|
func |
|
) |
| |
This is the decorator for declaring a representer function for this StatusVar.
- Parameters
-
- Returns
- : return the original function so this can be used as a decorator
The documentation for this class was generated from the following file: