53 #include "SplatCloudBackup.hh" 67 splatCloudObject_( _object ),
68 splatCloudBackup_( 0 )
71 std::cerr <<
"Create SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
")." << std::endl;
78 std::cerr <<
"Could not create SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
") : SplatCloud not found." << std::endl;
82 splatCloudBackup_ =
new SplatCloud( *splatCloud );
84 if( splatCloudBackup_ == 0 )
86 std::cerr <<
"Could not create SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
") : Out of memory." << std::endl;
95 SplatCloudBackup::~SplatCloudBackup()
98 std::cerr <<
"Delete SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
")." << std::endl;
101 delete splatCloudBackup_;
113 # ifdef REPORT_BACKUP 114 std::cerr <<
"Apply SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
")." << std::endl;
119 if( splatCloud == 0 )
121 std::cerr <<
"Could not apply SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
") : SplatCloud not found." << std::endl;
125 if( splatCloudBackup_ == 0 )
127 std::cerr <<
"Could not apply SplatCloudBackup with name: \"" << name_.toStdString() <<
"\" (id: " << id_ <<
") : No backup available." << std::endl;
132 *splatCloud = *splatCloudBackup_;
Class that encapsulates a backup.
void apply()
Revert this backup.
SplatCloud * splatCloud(BaseObjectData *_object)
Get a SplatCloud from an object.
virtual void apply()
Revert this backup.