44 #include "GroupBackup.hh" 46 #include <OpenFlipper/common/BackupData.hh> 51 GroupBackup::GroupBackup(
IdList _objectIDs, QString _name)
53 objectIDs_(_objectIDs)
58 for (
unsigned int i=0; i < objectIDs_.size(); ++i ){
69 backupData =
dynamic_cast< BackupData*
>(
object->objectData(OBJECT_BACKUPS));
73 if ( objectIDs_.size() > 1 )
77 backupIDs_.push_back(
id);
83 GroupBackup::~GroupBackup(){
95 const IdList& GroupBackup::objectIDs()
const{
101 bool GroupBackup::contains(
int _objectid )
const{
102 return std::find(objectIDs_.begin(), objectIDs_.end(), _objectid) != objectIDs_.end();
void apply()
Revert this backup.
int currentID()
return the id of the current backup state
void setLinks(IdList _objectIDs)
Class that encapsulates a backup.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Abstract class that is used to store backups.
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.