|
Developer Documentation
|
Abstract class that is used to store backups. More...
#include <OpenFlipper/common/BackupData.hh>
Public Member Functions | |
| BackupData (BaseObjectData *_object=0) | |
| Constructor. | |
| virtual | ~BackupData () |
| Destructor. | |
| void | storeBackup (BaseBackup *_backup) |
| store a backup | |
| void | undo () |
| perform an undo if possible | |
| void | redo () |
| perform a redo if possible | |
| int | undoID () |
| return the id of the next undo backup | |
| int | redoID () |
| return the id of the next redo backup | |
| int | currentID () |
| return the id of the current backup state | |
| QString | undoName () |
| return the name of the next undo backup | |
| QString | redoName () |
| return the name of the next redo backup | |
| bool | undoAvailable () |
| return if an undo backup is available | |
| bool | redoAvailable () |
| return if a redo backup is available | |
| bool | undoBlocked () |
| return if an undo backup is blocked | |
| bool | redoBlocked () |
| return if a redo backup is blocked | |
| void | clear () |
| remove all backups | |
| void | setLinks (IdList _objectIDs) |
| BaseBackup * | currentState () |
| return the current state | |
| size_t | maxBackups () |
| return the maximum of backups which are saved | |
| void | setMaxBackups (size_t _max) |
| set the maximum of saved backups | |
Public Member Functions inherited from PerObjectData | |
| PerObjectData () | |
| You have to provide your own constructor for your object. | |
| virtual PerObjectData * | copyPerObjectData () |
| Copy Function. | |
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.