15 #include <boost/signals.hpp>
35 virtual bool backupFileExists()
const = 0;
38 virtual bool factoryFileExists()
const = 0;
41 virtual bool backupDirExists()
const = 0;
44 virtual bool factoryDirExists()
const = 0;
47 virtual void backup() = 0;
50 virtual void deleteBackup() = 0;
54 virtual void restore(
bool fromFactory =
false) = 0;
57 virtual void getRestorableNames(
NameList& names) = 0;
75 template <
typename Manager>
128 virtual void restore(
bool fromFactory =
false)
144 names.push_back(
myManager.settings()->name());
virtual bool backupFileExists() const
Check for a the existence of the backup state?
Definition: DtBackupInterface.h:91
boost::signal< void()> signal_settingsRestored
Definition: DtBackupInterface.h:147
virtual bool factoryFileExists() const
Check for a the existence of the factory shipped state?
Definition: DtBackupInterface.h:97
The common template version of the backup interface.
Definition: DtBackupInterface.h:76
virtual bool factoryDirExists() const
Check for a the existence of the factory shipped state?
Definition: DtBackupInterface.h:109
void getRestorableNames(NameList &names)
Get the names of states restore will affect.
Definition: DtBackupInterface.h:142
static bool deleteFile(const std::string &file)
Delete the given file.
DtManagerBackup(Manager &manager)
CTOR.
Definition: DtBackupInterface.h:80
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:128
virtual void deleteBackup()
Delete the current backup state.
Definition: DtBackupInterface.h:121
virtual void backup()
Save the current state. This should overwrite the existing state.
Definition: DtBackupInterface.h:115
Settings class for reading and writing settings to/from files.
Definition: DtDeSettings.h:29
boost::signal< void(DtBackupInterface *)> signal_backupFileChanged
This signal should be emitted when the backup file is created, written to, or destroyed.
Definition: DtBackupInterface.h:61
Manager & myManager
Definition: DtBackupInterface.h:150
virtual bool backupDirExists() const
Check for a the existence of the backup state?
Definition: DtBackupInterface.h:103
Contains the DtDeSettings class declaration.
The backup interface, is used by components to control backups of a state.
Definition: DtBackupInterface.h:22
virtual ~DtManagerBackup()
DTOR.
Definition: DtBackupInterface.h:86
std::vector< std::string > NameList
Definition: DtBackupInterface.h:26