Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
- Public Member Functions inherited from PerObjectData
 PerObjectData ()
 You have to provide your own constructor for your object.
virtual ~PerObjectData ()
 Copy Constructor You have to reimplement this copy constructor for your object to get copied by the core. Otherwise, per Object data will not be copied when the core creates a copy of your object.
virtual PerObjectDatacopyPerObjectData ()
 Copy Function You have to reimplement this function to create a copy of your Object. By default it will return 0;.

Protected Attributes

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

Detailed Description

Abstract class that is used to store backups.

The default implementation can only backup perObjectDatas

Definition at line 59 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 180 of file BackupData.cc.


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