#include <SettingsMigration.h>
◆ StepList
◆ SettingConversionResult
| Enumerator |
|---|
| FAILURE | |
| NOT_PRESENT | |
| INVALID | |
| CONVERTED | |
◆ CSettingsMigration() [1/2]
| CSettingsMigration::CSettingsMigration |
( |
| ) |
|
◆ CSettingsMigration() [2/2]
| CSettingsMigration::CSettingsMigration |
( |
StepList | steps | ) |
|
◆ ConvertSettingBoolToInt()
maybe future
- Todo
- : strategy - read/write settings without dependency on CSetting* classes?
◆ UpdateXMLSettings()
| bool CSettingsMigration::UpdateXMLSettings |
( |
TiXmlElement * | root, |
|
|
int | currentVersion, |
|
|
int | targetVersion ) |
Upgrade the settings contained in root from fromVersion to targetVersion. Multiple steps will be executed automatically when fromVersion is more than one version away from targetVersion.
- Parameters
-
| [in,out] | root | Settings XML representation. |
| [in] | fromVersion | Version to upgrade from. |
| [in] | targetVersion | Version to upgrade to. |
- Returns
- False for catastrophic failure (for example
root left in an inconsistent state due to out of memory. A setting that doesn't convert properly due to an invalid value is not a catastrophic failure: the situation is logged and the setting receives its default value). True otherwise.
- Todo
- would be nice to include the filename or something to identify more precisely in the log
The documentation for this class was generated from the following files: