32 virtual bool backupFileExists()
const = 0;
35 virtual bool factoryFileExists()
const = 0;
38 virtual bool backupDirExists()
const = 0;
41 virtual bool factoryDirExists()
const = 0;
44 virtual void backup() = 0;
47 virtual void deleteBackup() = 0;
51 virtual void restore(
bool fromFactory =
false) = 0;
54 virtual void getRestorableNames(
NameList& names) = 0;
72 template <
typename Manager>
125 virtual void restore(
bool fromFactory =
false)
141 names.push_back(
myManager.settings()->name());
virtual bool backupFileExists() const
Check for a the existence of the backup state?
Definition: DtBackupInterface.h:88
virtual bool factoryFileExists() const
Check for a the existence of the factory shipped state?
Definition: DtBackupInterface.h:94
The common template version of the backup interface. The manager must implement this interface: virtu...
Definition: DtBackupInterface.h:73
virtual bool factoryDirExists() const
Check for a the existence of the factory shipped state?
Definition: DtBackupInterface.h:106
void getRestorableNames(NameList &names)
Get the names of states restore will affect.
Definition: DtBackupInterface.h:139
boost::signalslib::signal< void()> signal_settingsRestored
Definition: DtBackupInterface.h:144
static bool deleteFile(const std::string &file)
Delete the given file.
DtManagerBackup(Manager &manager)
CTOR.
Definition: DtBackupInterface.h:77
static bool exists(const std::string &path)
Check if the given path is exists.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
virtual void restore(bool fromFactory=false)
Restore the state, either from the backup (default) or from the factory.
Definition: DtBackupInterface.h:125
virtual void deleteBackup()
Delete the current backup state.
Definition: DtBackupInterface.h:118
boost::signalslib::signal< void(DtBackupInterface *)> signal_backupFileChanged
This signal should be emitted when the backup file is created, written to, or destroyed.
Definition: DtBackupInterface.h:58
virtual void backup()
Save the current state. This should overwrite the existing state.
Definition: DtBackupInterface.h:112
Settings class for reading and writing settings to/from files.
Definition: DtDeSettings.h:29
Manager & myManager
Definition: DtBackupInterface.h:147
virtual bool backupDirExists() const
Check for a the existence of the backup state?
Definition: DtBackupInterface.h:100
Contains the DtDeSettings class declaration.
The backup interface, is used by components to control backups of a state.
Definition: DtBackupInterface.h:19
virtual ~DtManagerBackup()
DTOR.
Definition: DtBackupInterface.h:83
std::vector< std::string > NameList
Definition: DtBackupInterface.h:23