#include <AutoSaver.h>
Public Member Functions | |
RecoveryWriter (AutoSaveProperty &) | |
virtual bool shouldWrite (const std::string &, const Base::Persistence *) const | |
virtual void writeFiles (void) | |
process the requested file storing More... | |
virtual ~RecoveryWriter () | |
![]() | |
void close () | |
FileWriter (const char *DirName) | |
void putNextEntry (const char *file) | |
virtual std::ostream & Stream (void) | |
virtual ~FileWriter () | |
![]() | |
int getFileVersion () const | |
void insertAsciiFile (const char *FileName) | |
insert a file as CDATA section in the XML file More... | |
void insertBinFile (const char *FileName) | |
insert a binary file BASE64 coded as CDATA section in the XML file More... | |
bool isForceXML (void) | |
check on state More... | |
void setFileVersion (int) | |
void setForceXML (bool on) | |
switch the writer in XML only mode (no files allowed) More... | |
Writer (void) | |
virtual ~Writer () | |
std::string addFile (const char *Name, const Base::Persistence *Object) | |
add a write request of a persistent object More... | |
const std::vector< std::string > & getFilenames () const | |
get all registered file names More... | |
void setMode (const std::string &mode) | |
Set mode. More... | |
void setModes (const std::set< std::string > &modes) | |
Set modes. More... | |
bool getMode (const std::string &mode) const | |
Get mode. More... | |
std::set< std::string > getModes () const | |
Get modes. More... | |
void clearMode (const std::string &mode) | |
Clear mode. More... | |
void clearModes () | |
Clear modes. More... | |
void addError (const std::string &) | |
bool hasErrors () const | |
void clearErrors () | |
std::vector< std::string > getErrors () const | |
const char * ind (void) const | |
get the current indentation More... | |
void incInd (void) | |
increase indentation by one tab More... | |
void decInd (void) | |
decrease indentation by one tab More... | |
Additional Inherited Members | |
![]() | |
std::string ObjectName | |
name for underlying file saves More... | |
![]() | |
std::string getUniqueFileName (const char *Name) | |
![]() | |
std::string DirName | |
std::ofstream FileStream | |
![]() | |
std::vector< FileEntry > FileList | |
std::vector< std::string > FileNames | |
std::vector< std::string > Errors | |
std::set< std::string > Modes | |
short indent | |
char indBuf [1024] | |
bool forceXML | |
int fileVersion | |
Constructor & Destructor Documentation
◆ RecoveryWriter()
RecoveryWriter::RecoveryWriter | ( | AutoSaveProperty & | saver | ) |
◆ ~RecoveryWriter()
|
virtual |
Member Function Documentation
◆ shouldWrite()
|
virtual |
This method can be re-implemented in sub-classes to avoid to write out certain objects. The default implementation always returns true.
Reimplemented from Base::FileWriter.
References Gui::AutoSaveProperty::fileMap, Base::Persistence::getClassTypeId(), App::Property::getContainer(), Base::BaseClass::isDerivedFrom(), and Gui::AutoSaveProperty::touched.
Referenced by writeFiles().
◆ writeFiles()
|
virtual |
process the requested file storing
Reimplemented from Base::FileWriter.
References Base::FileInfo::createDirectory(), Base::FileWriter::DirName, Base::Writer::FileList, Base::Writer::FileEntry::FileName, Base::FileWriter::FileStream, Base::Persistence::getClassTypeId(), Base::Writer::getModes(), Base::BaseClass::isDerivedFrom(), Base::Writer::FileEntry::Object, Base::Persistence::SaveDocFile(), and shouldWrite().
Referenced by Gui::AutoSaver::saveDocument().
The documentation for this class was generated from the following files:
- src/Gui/AutoSaver.h
- src/Gui/AutoSaver.cpp