|
CX Framework
Cross-platform C utility framework
|
Functions | |
| bool | setsBind (SSDNode *sets, SetsBindSpec *bindings, void *base) |
| void | setsUnbindAll (SSDNode *sets) |
| void | setsCheckBound (SSDNode *sets) |
| bool | setsImport (SSDNode *sets, SetsBindSpec *bindings, void *base) |
| bool | setsExport (SSDNode *sets, SetsBindSpec *bindings, void *base) |
Functions for binding settings paths to program variables for automatic synchronization.
| bool setsBind | ( | SSDNode * | sets, |
| SetsBindSpec * | bindings, | ||
| void * | base | ||
| ) |
Binds settings paths to program variables for automatic two-way synchronization.
Establishes connections between settings paths and program variables. When a setting is accessed, the bound variable is automatically updated. When the bound variable changes, the setting is updated at the next flush interval.
Important Notes:
bindings must be a static array terminated with a {0} entry (NULL name field)| sets | The settings tree root |
| bindings | Array of binding specifications (must be NULL-terminated) |
| base | Base pointer to the structure containing the variables |
Example:
| void setsCheckBound | ( | SSDNode * | sets | ) |
Forces a full rescan of all bound variables at the next flush interval.
Normally bound variables are checked for changes only during flush operations. This function requests an immediate check of all bound variables at the next flush to detect any modifications and update the settings tree accordingly.
| sets | The settings tree root |
| bool setsExport | ( | SSDNode * | sets, |
| SetsBindSpec * | bindings, | ||
| void * | base | ||
| ) |
Saves variable values into settings without establishing bindings.
Copies values from the specified variables into the settings tree, but does not create ongoing synchronization. This is a one-time export operation.
Note: Currently not implemented.
| sets | The settings tree root |
| bindings | Array of binding specifications |
| base | Base pointer to the structure containing the variables |
| bool setsImport | ( | SSDNode * | sets, |
| SetsBindSpec * | bindings, | ||
| void * | base | ||
| ) |
Loads settings values into variables without establishing bindings.
Copies values from the settings tree into the specified variables, but does not create ongoing synchronization. This is a one-time import operation.
Note: Currently not implemented.
| sets | The settings tree root |
| bindings | Array of binding specifications |
| base | Base pointer to the structure containing the variables |
| void setsUnbindAll | ( | SSDNode * | sets | ) |
Removes all variable bindings from the settings tree.
Unbinds all variables that were previously bound with setsBind(). After calling this, variables will no longer be synchronized with settings.
| sets | The settings tree root |