Developer Documentation
BackupData Class Reference

Abstract class that is used to store backups. More...

#include <OpenFlipper/common/BackupData.hh>

Inheritance diagram for BackupData:
PerObjectData GroupData

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)
 
BaseBackupcurrentState ()
 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 PerObjectDatacopyPerObjectData ()
 Copy Function. More...
 

Protected Attributes

std::vector< BaseBackup * > undoStates_
 
std::vector< BaseBackup * > redoStates_
 
BaseBackupcurrentState_
 
BaseObjectDataobject_
 
size_t maxBackups_
 

Detailed Description

Abstract class that is used to store backups.

The default implementation can only backup perObjectDatas

Definition at line 66 of file BackupData.hh.

Member Function Documentation

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 241 of file BackupData.cc.


The documentation for this class was generated from the following files: