Developer Documentation
GroupData Class Reference

Class that is used to store global(group) backups. More...

#include <Plugin-Backup/GroupData.hh>

Inheritance diagram for GroupData:
BackupData PerObjectData

Public Member Functions

 GroupData ()
 Constructor. More...
 
 ~GroupData ()
 Destructor. More...
 
void updateBackupData (int _objectid, bool _isUndo)
 remove object from data More...
 
void eraseBackups (int _objectid)
 erase all backups containing given id More...
 
void undo ()
 perform an undo if possible More...
 
void redo ()
 perform an redo if possible More...
 
void undo (int _objectid)
 perform an undo if possible More...
 
void redo (int _objectid)
 perform a redo if possible More...
 
- Public Member Functions inherited from BackupData
 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...
 

Additional Inherited Members

- Protected Attributes inherited from BackupData
std::vector< BaseBackup * > undoStates_
 
std::vector< BaseBackup * > redoStates_
 
BaseBackupcurrentState_
 
BaseObjectDataobject_
 
size_t maxBackups_
 

Detailed Description

Class that is used to store global(group) backups.

Definition at line 54 of file GroupData.hh.

Constructor & Destructor Documentation

◆ GroupData()

GroupData::GroupData ( )

Constructor.

Definition at line 51 of file GroupData.cc.

◆ ~GroupData()

GroupData::~GroupData ( )

Destructor.

Definition at line 57 of file GroupData.cc.

Member Function Documentation

◆ eraseBackups()

void GroupData::eraseBackups ( int  _objectid)

erase all backups containing given id

Definition at line 309 of file GroupData.cc.

◆ redo() [1/2]

void GroupData::redo ( )

perform an redo if possible

Redo operation on groups.

The redo on groups is different then on single objects we revert to the last redo state and perform a redo on every involved object

Definition at line 118 of file GroupData.cc.

◆ redo() [2/2]

void GroupData::redo ( int  _objectid)

perform a redo if possible

Definition at line 266 of file GroupData.cc.

◆ undo() [1/2]

void GroupData::undo ( )

perform an undo if possible

Undo operation on groups.

The undo on groups is different then on single objects we cannot revert to the last undo state. We have to check which objects are affected by the current state and revert to the last state for all of them

Definition at line 69 of file GroupData.cc.

◆ undo() [2/2]

void GroupData::undo ( int  _objectid)

perform an undo if possible

Definition at line 242 of file GroupData.cc.

◆ updateBackupData()

void GroupData::updateBackupData ( int  _objectid,
bool  _isUndo 
)

remove object from data

Update GroupData structure after object undo/redo.

After and undo/redo on an object the global structure has to be updated to stay in sync.

Definition at line 166 of file GroupData.cc.


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