Developer Documentation
|
Abstract class that is used to store backups. More...
#include <OpenFlipper/common/BackupData.hh>
Public Member Functions | |
BackupData (BaseObjectData *_object=0) | |
Constructor. More... | |
virtual | ~BackupData () |
Destructor. More... | |
void | storeBackup (BaseBackup *_backup) |
store a backup More... | |
void | undo () |
perform an undo if possible More... | |
void | redo () |
perform a redo if possible More... | |
int | undoID () |
return the id of the next undo backup More... | |
int | redoID () |
return the id of the next redo backup More... | |
int | currentID () |
return the id of the current backup state More... | |
QString | undoName () |
return the name of the next undo backup More... | |
QString | redoName () |
return the name of the next redo backup More... | |
bool | undoAvailable () |
return if an undo backup is available More... | |
bool | redoAvailable () |
return if a redo backup is available More... | |
bool | undoBlocked () |
return if an undo backup is blocked More... | |
bool | redoBlocked () |
return if a redo backup is blocked More... | |
void | clear () |
remove all backups More... | |
void | setLinks (IdList _objectIDs) |
BaseBackup * | currentState () |
return the current state More... | |
size_t | maxBackups () |
return the maximum of backups which are saved More... | |
void | setMaxBackups (size_t _max) |
set the maximum of saved backups More... | |
![]() | |
PerObjectData () | |
You have to provide your own constructor for your object. More... | |
virtual PerObjectData * | copyPerObjectData () |
Copy Function. More... | |
Protected Attributes | |
std::vector< BaseBackup * > | undoStates_ |
std::vector< BaseBackup * > | redoStates_ |
BaseBackup * | currentState_ |
BaseObjectData * | object_ |
size_t | maxBackups_ |
Abstract class that is used to store backups.
The default implementation can only backup perObjectDatas
Definition at line 57 of file BackupData.hh.
|
explicit |
Constructor.
Definition at line 46 of file BackupData.cc.
|
virtual |
Destructor.
Definition at line 52 of file BackupData.cc.
void BackupData::clear | ( | ) |
remove all backups
Definition at line 214 of file BackupData.cc.
int BackupData::currentID | ( | ) |
return the id of the current backup state
Definition at line 173 of file BackupData.cc.
BaseBackup * BackupData::currentState | ( | ) |
return the current state
Definition at line 241 of file BackupData.cc.
size_t BackupData::maxBackups | ( | ) |
return the maximum of backups which are saved
Definition at line 58 of file BackupData.cc.
void BackupData::redo | ( | ) |
perform a redo if possible
Definition at line 114 of file BackupData.cc.
bool BackupData::redoAvailable | ( | ) |
return if a redo backup is available
Definition at line 189 of file BackupData.cc.
bool BackupData::redoBlocked | ( | ) |
return if a redo backup is blocked
Definition at line 205 of file BackupData.cc.
int BackupData::redoID | ( | ) |
return the id of the next redo backup
Definition at line 163 of file BackupData.cc.
QString BackupData::redoName | ( | ) |
return the name of the next redo backup
Definition at line 143 of file BackupData.cc.
void BackupData::setLinks | ( | IdList | _objectIDs | ) |
add links to other backups for the current state this is used to ensure that the backups are only applied simultaneously
Definition at line 233 of file BackupData.cc.
void BackupData::setMaxBackups | ( | size_t | _max | ) |
set the maximum of saved backups
Definition at line 65 of file BackupData.cc.
void BackupData::storeBackup | ( | BaseBackup * | _backup | ) |
store a backup
Definition at line 72 of file BackupData.cc.
void BackupData::undo | ( | ) |
perform an undo if possible
Definition at line 95 of file BackupData.cc.
bool BackupData::undoAvailable | ( | ) |
return if an undo backup is available
Definition at line 183 of file BackupData.cc.
bool BackupData::undoBlocked | ( | ) |
return if an undo backup is blocked
Definition at line 195 of file BackupData.cc.
int BackupData::undoID | ( | ) |
return the id of the next undo backup
Definition at line 153 of file BackupData.cc.
QString BackupData::undoName | ( | ) |
return the name of the next undo backup
Definition at line 133 of file BackupData.cc.
|
protected |
Definition at line 116 of file BackupData.hh.
|
protected |
Definition at line 120 of file BackupData.hh.
|
protected |
Definition at line 118 of file BackupData.hh.
|
protected |
Definition at line 115 of file BackupData.hh.
|
protected |
Definition at line 114 of file BackupData.hh.