![]() |
VR-Forces 4.3.1 Class Documentation
|
The makVrv::DtSettingsBackupManager class is a central place to store objects that can be backed up and restored. More...

Public Member Functions | |
| virtual | ~DtSettingsBackupManager () |
| DTOR. | |
| virtual void | setBackupsPath (const std::string &) |
| Sets the backups path. If it does not exist when the backup wants to be created, creates the path. | |
| const std::string & | backupsPath () const |
| virtual void | registerSettingsBackup (DtSettingsBackup *backup) |
| Registers the settings class with the manager. | |
| virtual void | unregisterSettingsBackup (const std::string &) |
| Unregisters item for backup. Sends out appropriate messages if either local or factory backup changes. | |
| virtual void | unregisterSettingsBackup (DtSettingsBackup *backup) |
| Calls similar class name with backupClassType() of object. | |
| virtual void | settingsObjectDestroyed (const DtSettingsBackup *) |
| Called when a registered settings object is destroyed, unregisters it. | |
| virtual void | settingsClearedBackup (const DtSettingsBackup *) |
| virtual void | settingsRestored (const DtSettingsBackup *) |
| virtual void | settingsBackedUp (const DtSettingsBackup *) |
| virtual bool | setFactoryFile (const std::string &, const std::string &factoryFile) |
| Sets the factory file to be used for restore for the specified backup. | |
| virtual bool | setFactoryFile (const DtSettingsBackup *, const std::string &factoryFile) |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | canBeRevertedFromStartup (const std::string &) const |
| Returns true if the file can be restored from a local backup. | |
| virtual bool | canBeRevertedFromStartup (const DtSettingsBackup *) const |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | canBeRestoredFromFactory (const std::string &) const |
| Returns true if can be restored from factory. | |
| virtual bool | canBeRestoredFromFactory (const DtSettingsBackup *) const |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | backup (const std::string &) |
| Backs up the specified object and sends out signal through the shared signaller that the object has been backed=up. | |
| virtual bool | backup (const DtSettingsBackup *) |
| Calls similar class name with backupClassType() of object. | |
| virtual void | clearBackup (const std::string &) |
| Clears out any backup settings for specified object. | |
| virtual void | clearBackup (const DtSettingsBackup *) |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | revertToStartup (const std::string &) |
| Restores settings for the supplied backup object by calling the restore() method on it. | |
| virtual bool | revertToStartup (const DtSettingsBackup *) |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | restoreFromFactory (const std::string &) |
| Restores settings for the supplied backup object by restoring from factory file. | |
| virtual bool | restoreFromFactory (const DtSettingsBackup *) |
| Calls similar class name with backupClassType() of object. | |
| virtual bool | registered (const std::string &) const |
| Returns whether or not this class is registered. | |
| virtual bool | registered (const DtSettingsBackup *) const |
| Calls similar class name with backupClassType() of object. | |
| virtual void | restoreWhenRestored (const std::string &toRestore, const std::string &whenRestored, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) |
| Restores the specified backup setting when the host backup setting is restored. | |
| virtual void | restoreWhenRestored (const DtSettingsBackup *toRestore, const DtSettingsBackup *whenRestored, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) |
| Calls similar class name with backupClassType() of objects. | |
| virtual void | cancelRestoreWhenRestored (const std::string &toRestore, const std::string &whenRestored, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) |
| Removes the specified backup setting to be restored then the host is restored. | |
| virtual void | cancelRestoreWhenRestored (const DtSettingsBackup *toRestore, const DtSettingsBackup *whenRestored, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) |
| Calls similar class name with backupClassType() of objects. | |
| virtual std::vector< std::string > | willRestoreWhenRestored (const DtSettingsBackup *toRestore, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) const |
| Calls similar method with backupClassType() of object. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtSettingsBackupManager & | instance (DtDe &de) |
| Get an instance of the settings manager. | |
Protected Types | |
| typedef std::map< std::string, DtSettingsBackup * > | DtSettingsBackupMap |
Protected Member Functions | |
| void | willRestoreWhenRestored (const std::string &toRestore, std::vector< std::string > &willRestore, const DtSettingsBackup::RestoreFlags &f=DtSettingsBackup::RestoreAll) const |
| Returns a list (names) of objects that will be restored for the given restore flags. | |
| DtSettingsBackupManager (DtDe &de) | |
| CTOR. Called from shared settings manager. | |
Protected Attributes | |
| DtDe & | myDe |
| DtSettingsBackupMap | myBackups |
| std::string | myBackupsPath |
| Map that maps backup class name to backup of object. | |
| boost::mutex | myMonitor |
The makVrv::DtSettingsBackupManager class is a central place to store objects that can be backed up and restored.
In order for objects to be backed up they must be of the makVrv::DtSettingsBackup class and must also implement the boost serialize method to archive and restore settings. When registering this this manager, if the object also can be restored from a factory setting, be sure to supply the factory file information either upon registration time or at a future date.
Note that this class will do it's own locking to allow multi-thread access
|
protected |
|
virtual |
DTOR.
|
protected |
CTOR. Called from shared settings manager.
|
static |
Get an instance of the settings manager.
Referenced by makVrv::DtRecordSettingsBackupInterface::DtRecordSettingsBackupInterface(), makVrv::DtBaseSettingsManager< makArchives::DtOculusSettingsRecord >::initializeBackup(), and makVrv::DtBaseSharedSettingsManager< makArchives::DtSymbolDecorationSettingsRecord, DtSymbolDecorationSettings >::initializeBackup().
|
virtual |
Sets the backups path. If it does not exist when the backup wants to be created, creates the path.
|
inline |
|
virtual |
Registers the settings class with the manager.
If the name supplied for registration already exists, the existing one will be replaced by the new one. Each settings object must implement the backupClassType() to return the type of backup object it is.
Referenced by makVrv::DtRecordSettingsBackupInterface::DtRecordSettingsBackupInterface(), makVrv::DtBaseSettingsManager< makArchives::DtOculusSettingsRecord >::initializeBackup(), and makVrv::DtBaseSharedSettingsManager< makArchives::DtSymbolDecorationSettingsRecord, DtSymbolDecorationSettings >::initializeBackup().
|
virtual |
Unregisters item for backup. Sends out appropriate messages if either local or factory backup changes.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Called when a registered settings object is destroyed, unregisters it.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets the factory file to be used for restore for the specified backup.
Returns true if setting can be backed up from file
|
virtual |
Calls similar class name with backupClassType() of object.
Emits signal if factory restore status has changed
|
virtual |
Returns true if the file can be restored from a local backup.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Returns true if can be restored from factory.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Backs up the specified object and sends out signal through the shared signaller that the object has been backed=up.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Clears out any backup settings for specified object.
If backup status changes, emits signal
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Restores settings for the supplied backup object by calling the restore() method on it.
If no backup exists for the object, returns false. Signal will be emitted after object is restored
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Restores settings for the supplied backup object by restoring from factory file.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Returns whether or not this class is registered.
|
virtual |
Calls similar class name with backupClassType() of object.
|
virtual |
Restores the specified backup setting when the host backup setting is restored.
This can chain so that many settings can be restored if one is
|
virtual |
Calls similar class name with backupClassType() of objects.
|
virtual |
Removes the specified backup setting to be restored then the host is restored.
|
virtual |
Calls similar class name with backupClassType() of objects.
|
virtual |
Calls similar method with backupClassType() of object.
|
protected |
Returns a list (names) of objects that will be restored for the given restore flags.
|
protected |
|
protected |
|
protected |
Map that maps backup class name to backup of object.
|
mutableprotected |