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. 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)
 
BaseBackupcurrentState ()
 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...
 
- Public Member Functions inherited from PerObjectData
 PerObjectData ()
 You have to provide your own constructor for your object. More...
 
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 57 of file BackupData.hh.

Constructor & Destructor Documentation

◆ BackupData()

BackupData::BackupData ( BaseObjectData _object = 0)
explicit

Constructor.

Definition at line 46 of file BackupData.cc.

◆ ~BackupData()

BackupData::~BackupData ( )
virtual

Destructor.

Definition at line 52 of file BackupData.cc.

Member Function Documentation

◆ clear()

void BackupData::clear ( )

remove all backups

Definition at line 214 of file BackupData.cc.

◆ currentID()

int BackupData::currentID ( )

return the id of the current backup state

Definition at line 173 of file BackupData.cc.

◆ currentState()

BaseBackup * BackupData::currentState ( )

return the current state

Definition at line 241 of file BackupData.cc.

◆ maxBackups()

size_t BackupData::maxBackups ( )

return the maximum of backups which are saved

Definition at line 58 of file BackupData.cc.

◆ redo()

void BackupData::redo ( )

perform a redo if possible

Definition at line 114 of file BackupData.cc.

◆ redoAvailable()

bool BackupData::redoAvailable ( )

return if a redo backup is available

Definition at line 189 of file BackupData.cc.

◆ redoBlocked()

bool BackupData::redoBlocked ( )

return if a redo backup is blocked

Definition at line 205 of file BackupData.cc.

◆ redoID()

int BackupData::redoID ( )

return the id of the next redo backup

Definition at line 163 of file BackupData.cc.

◆ redoName()

QString BackupData::redoName ( )

return the name of the next redo backup

Definition at line 143 of file BackupData.cc.

◆ setLinks()

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.

◆ setMaxBackups()

void BackupData::setMaxBackups ( size_t  _max)

set the maximum of saved backups

Definition at line 65 of file BackupData.cc.

◆ storeBackup()

void BackupData::storeBackup ( BaseBackup _backup)

store a backup

Definition at line 72 of file BackupData.cc.

◆ undo()

void BackupData::undo ( )

perform an undo if possible

Definition at line 95 of file BackupData.cc.

◆ undoAvailable()

bool BackupData::undoAvailable ( )

return if an undo backup is available

Definition at line 183 of file BackupData.cc.

◆ undoBlocked()

bool BackupData::undoBlocked ( )

return if an undo backup is blocked

Definition at line 195 of file BackupData.cc.

◆ undoID()

int BackupData::undoID ( )

return the id of the next undo backup

Definition at line 153 of file BackupData.cc.

◆ undoName()

QString BackupData::undoName ( )

return the name of the next undo backup

Definition at line 133 of file BackupData.cc.

Member Data Documentation

◆ currentState_

BaseBackup* BackupData::currentState_
protected

Definition at line 116 of file BackupData.hh.

◆ maxBackups_

size_t BackupData::maxBackups_
protected

Definition at line 120 of file BackupData.hh.

◆ object_

BaseObjectData* BackupData::object_
protected

Definition at line 118 of file BackupData.hh.

◆ redoStates_

std::vector< BaseBackup* > BackupData::redoStates_
protected

Definition at line 115 of file BackupData.hh.

◆ undoStates_

std::vector< BaseBackup* > BackupData::undoStates_
protected

Definition at line 114 of file BackupData.hh.


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