ImFusion SDK 4.3
ImFusion::SettingsMigration Namespace Reference

Helper functions for migrating settings. More...

Detailed Description

Helper functions for migrating settings.

Functions

int version (const std::string &name)
 Returns the version for the given settings group.
 
void setVersion (const std::string &name, int version)
 Sets the version for the given settings group.
 
bool migrateQt (const std::string &oldName, const std::string &newName, const Properties &p)
 If version(newName) < 1, attempts to migrate the settings for newName from the Qt backend to ImFusion::GlobalSettings, sets the version to 1, and returns true.
 
template<typename T>
bool migrateQt (const std::string &oldName)
 Similar to the other overload, but will automatically determine the settings name and properties from the given Configurable type.
 

Function Documentation

◆ migrateQt() [1/2]

bool migrateQt ( const std::string & oldName,
const std::string & newName,
const Properties & p )

If version(newName) < 1, attempts to migrate the settings for newName from the Qt backend to ImFusion::GlobalSettings, sets the version to 1, and returns true.

Otherwise, returns false.

Parameters
oldNameThe name of the settings group in the Qt backend. Can be empty to signify the root group.
newNameThe name of the settings in ImFusion::GlobalSettings.
pThe template properties of the settings to migrate.

◆ migrateQt() [2/2]

template<typename T>
bool migrateQt ( const std::string & oldName)

Similar to the other overload, but will automatically determine the settings name and properties from the given Configurable type.

Parameters
oldNameThe name of the settings group in the Qt backend. Can be empty to signify the root group.
Search Tab / S to search, Esc to close