Developer Documentation
BaseBackup Class Reference

Class that encapsulates a backup. More...

#include <OpenFlipper/common/BaseBackup.hh>

Inheritance diagram for BaseBackup:
BSplineCurveBackup GroupBackup PolyMeshBackup SkeletonBackup SplatCloudBackup TriMeshBackup

Public Member Functions

 BaseBackup (const QString &_name)
 
 BaseBackup (BaseObjectData *_object, const QString &_name, UpdateType _type)
 constructor More...
 
virtual void apply ()
 Revert this backup. More...
 
QString name ()
 Get the backups name) More...
 
void setLinks (IdList _objectIDs)
 Set links to corresponding backups. More...
 
int id ()
 get id of this backup More...
 
bool blocked ()
 Returns if this backup is blocked. More...
 

Protected Attributes

std::vector< std::pair< QString, PerObjectData * > > objectDatas_
 Backup of the perObjectData objects. More...
 
BaseObjectDataobject_
 
QString name_
 
IdList links_
 
int id_
 

Detailed Description

Class that encapsulates a backup.

Definition at line 53 of file BaseBackup.hh.

Constructor & Destructor Documentation

◆ BaseBackup() [1/2]

BaseBackup::BaseBackup ( const QString &  _name)
explicit

Definition at line 51 of file BaseBackup.cc.

◆ BaseBackup() [2/2]

BaseBackup::BaseBackup ( BaseObjectData _object,
const QString &  _name,
UpdateType  _type 
)

constructor

Parameters
_objectPointer to the object, this backup will belong to
_nameName of the object
_typeType of change which can be used to create more specific backups (e.g. selection only)

Definition at line 57 of file BaseBackup.cc.

◆ ~BaseBackup()

BaseBackup::~BaseBackup ( )
virtual

Definition at line 83 of file BaseBackup.cc.

Member Function Documentation

◆ apply()

void BaseBackup::apply ( )
virtual

Revert this backup.

This function has to be implemented. It will be called when the backup should be restored.

Note
You have to call the BaseBackup::apply() first in your implementation of this function.

You have to restore your backup to the corresponding object when this function gets called.

Reimplemented in GroupBackup, BSplineCurveBackup, PolyMeshBackup, TriMeshBackup, SkeletonBackup, and SplatCloudBackup.

Definition at line 93 of file BaseBackup.cc.

◆ blocked()

bool BaseBackup::blocked ( )

Returns if this backup is blocked.

When Backups are grouped together, they can not be reversed o their own but oly together with the others in that backup group. This flag indicates, that the backup is part of a group and can not be reversed on its own.

Definition at line 146 of file BaseBackup.cc.

◆ id()

int BaseBackup::id ( )

get id of this backup

Automatically generated id for this backup.

Definition at line 140 of file BaseBackup.cc.

◆ name()

QString BaseBackup::name ( )

Get the backups name)

Definition at line 134 of file BaseBackup.cc.

◆ setLinks()

void BaseBackup::setLinks ( IdList  _objectIDs)

Set links to corresponding backups.

Backups can be grouped together. The backups store the links to their group members via this function.

Definition at line 152 of file BaseBackup.cc.

Member Data Documentation

◆ id_

int BaseBackup::id_
protected

Definition at line 117 of file BaseBackup.hh.

◆ links_

IdList BaseBackup::links_
protected

Definition at line 115 of file BaseBackup.hh.

◆ name_

QString BaseBackup::name_
protected

Definition at line 114 of file BaseBackup.hh.

◆ object_

BaseObjectData* BaseBackup::object_
protected

Definition at line 113 of file BaseBackup.hh.

◆ objectDatas_

std::vector< std::pair<QString, PerObjectData*> > BaseBackup::objectDatas_
protected

Backup of the perObjectData objects.

Definition at line 111 of file BaseBackup.hh.


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