56                switch( 
Get<int>( 
"last_mod_layer" ).value_or( 0 ) )
 
   59                case 0: 
Set( 
"last_mod_layer", 1 ); 
break;
 
   60                case 1: 
Set( 
"last_mod_layer", 2 ); 
break;
 
   61                case 2: 
Set( 
"last_mod_layer", 7 ); 
break;
 
   62                case 3: 
Set( 
"last_mod_layer", 3 ); 
break;
 
   63                case 4: 
Set( 
"last_mod_layer", 4 ); 
break;
 
   64                case 5: 
Set( 
"last_mod_layer", 5 ); 
break;
 
   65                case 6: 
Set( 
"last_mod_layer", 6 ); 
break;
 
 
const int bitmap2cmpSchemaVersion
! Update the schema version whenever a migration is required
 
APP_SETTINGS_BASE(const std::string &aFilename, int aSchemaVersion)
 
virtual bool MigrateFromLegacy(wxConfigBase *aCfg) override
Migrates from wxConfig to JSON-based configuration.
 
wxString m_BitmapFileName
 
wxString m_ConvertedFileName
 
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
 
bool fromLegacyString(wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
Translates a legacy wxConfig string value to a given JSON pointer value.
 
bool fromLegacy(wxConfigBase *aConfig, const std::string &aKey, const std::string &aDest)
Translates a legacy wxConfig value to a given JSON pointer value.
 
void Set(const std::string &aPath, ValueType aVal)
Stores a value into the JSON document Will throw an exception if ValueType isn't something that the l...
 
std::optional< ValueType > Get(const std::string &aPath) const
Fetches a value from within the JSON document.
 
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
 
void registerMigration(int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
Registers a migration from one schema version to another.