Commit d19b5cc7 authored by Jan Möbius's avatar Jan Möbius

Document base backup

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12690 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 07851425
......@@ -57,19 +57,59 @@ class DLLEXPORT BaseBackup
public:
BaseBackup(QString _name);
/** \brief constructor
*
* @param _object Pointer to the object, this backup will belong to
* @param _name Name of the object
* @param _type Type of change which can be used to create more specific backups (e.g. selection only)
*
*/
BaseBackup(BaseObjectData* _object, QString _name, UpdateType _type);
virtual ~BaseBackup();
public:
/** \brief 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.
*/
virtual void apply();
/** \brief Get the backups name)
*
*/
QString name();
/** \brief Set links to corresponding backups
*
* Backups can be grouped together. The backups store the links to their group members via
* this function.
*/
void setLinks(IdList _objectIDs);
/** \brief get id of this backup
*
* Automatically generated id for this backup.
*/
int id();
/** \brief 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.
*/
bool blocked();
protected:
//backup of the perObjectData objects
/// Backup of the perObjectData objects
std::vector< std::pair<QString, PerObjectData*> > objectDatas_;
BaseObjectData* object_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment