Config class.
Method | __init__ |
Initializes the configuration. |
Method | cleanup |
Perform clean-up. |
Method | get |
Gets boolean value, convert from string. |
Method | get |
Gets float value, convert from string. |
Method | get |
Gets some "_key"-"_value" of data type "_type". |
Method | get |
Gets integer value, convert from string. |
Method | get |
Gets a single 3D point, convert from string. |
Method | get |
Gets list of 3D points, convert from string. |
Method | get |
Reads a configuration value. |
Method | load |
Loads the default configuration. |
Method | load |
Loads the configuration from file. |
Method | on |
Gets called when the configuration was loaded, saved or changed. |
Method | remove |
Removes a key from the configuration. |
Method | save |
Saves the configuration to file. |
Method | set |
Sets boolean value, convert to string. |
Method | set |
Sets float value, convert to string. |
Method | set |
Sets some "_key"-"_value" of data type "_type". |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
If "values" is None, reads and returns all key-values in "types". Note: The actual keys saved in the configuration file are prefixed with "prefix", and suffixed with "suffix". |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value. |
Method | set |
Sets integer value, convert to string. |
Method | set |
Sets a single 3D point, convert to string. |
Method | set |
Sets list of 3D points, convert to string. |
Method | set |
Writes a configuration value. |
Class Variable |
|
Undocumented |
Instance Variable | filename |
Undocumented |
Instance Variable | synced |
Undocumented |
Instance Variable | _parser |
Undocumented |
str
, _type: str
) -> str | bool | int | float | np.ndarray | list[ float] | list[ list[ float]]
:
¶
Gets some "_key"-"_value" of data type "_type".
Parameters | |
_key:str | Key |
_type:str | Data type |
Returns | |
str | bool | int | float | np.ndarray | list[ | Data (type determined by "_type") |
Gets list of 3D points, convert from string.
Parameters | |
key:str | Key |
Returns | |
list[ | List of 3D points |
Loads the default configuration.
Parameters | |
defaultdict | Default configuration |
signalbool | Undocumented |
Loads the configuration from file.
Parameters | |
filename:str | Filename |
defaultdict | Default configuration |
magneticalc.Project.Project
Gets called when the configuration was loaded, saved or changed.
str
, _type: str
, _value: str | bool | int | float | np.ndarray | list[ float] | list[ list[ float]]
):
¶
Sets some "_key"-"_value" of data type "_type".
Parameters | |
_key:str | Key |
_type:str | Data type |
_value:str | bool | int | float | np.ndarray | list[ | Data (type determined by "_type") |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:bool | Value |
Returns | |
bool | Undocumented |
If "values" is None, reads and returns all key-values in "types". Note: The actual keys saved in the configuration file are prefixed with "prefix", and suffixed with "suffix".
If "values" is not None, writes and returns all key-values in "types". Note: In this case, "values" must have the same keys as "types".
Parameters | |
prefix:str | Prefix |
suffix:str | Suffix |
types:dict | Key:Type (Dictionary) |
values:dict | None | Key:Value (Dictionary) |
Returns | |
dict | Undocumented |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:float | Value |
Returns | |
float | Undocumented |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:int | Value |
Returns | |
int | Undocumented |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:np.ndarray | list[ | Value |
Returns | |
np.ndarray | list[ | Undocumented |
str
, value: np.ndarray | list[ list[ float]]
) -> np.ndarray | list[ list[ float]]
:
¶
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:np.ndarray | list[ | Value |
Returns | |
np.ndarray | list[ | Undocumented |
If value is not None, writes and returns key-value; otherwise (if value is None), reads and returns key-value.
Parameters | |
key:str | Key |
value:str | Value |
Returns | |
str | Undocumented |
Sets a single 3D point, convert to string.
Parameters | |
key:str | Key |
value:np.ndarray | list[ | Single 3D point |
Sets list of 3D points, convert to string.
Parameters | |
key:str | Key |
value:np.ndarray | list[ | List of 3D points |