The ZipWriter class This is an important helper class implementation for the store and retrieval system of persistent objects in FreeCAD. More...
#include <Writer.h>
Public Member Functions | |
| void | putNextEntry (const char *str) |
| void | setComment (const char *str) |
| void | setLevel (int level) |
| virtual std::ostream & | Stream (void) |
| virtual void | writeFiles (void) |
| process the requested file storing More... | |
| ZipWriter (const char *FileName) | |
| ZipWriter (std::ostream &) | |
| virtual | ~ZipWriter () |
Public Member Functions inherited from Base::Writer | |
| 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 | |
Public Attributes inherited from Base::Writer | |
| std::string | ObjectName |
| name for underlying file saves More... | |
Protected Member Functions inherited from Base::Writer | |
| std::string | getUniqueFileName (const char *Name) |
Protected Attributes inherited from Base::Writer | |
| 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 |
Detailed Description
The ZipWriter class This is an important helper class implementation for the store and retrieval system of persistent objects in FreeCAD.
- See also
- Base::Persistence
Constructor & Destructor Documentation
◆ ZipWriter() [1/2]
| ZipWriter::ZipWriter | ( | const char * | FileName | ) |
◆ ZipWriter() [2/2]
| ZipWriter::ZipWriter | ( | std::ostream & | os | ) |
◆ ~ZipWriter()
|
virtual |
References zipios::ZipOutputStream::close().
Member Function Documentation
◆ putNextEntry()
| void Base::ZipWriter::putNextEntry | ( | const char * | str | ) |
◆ setComment()
| void Base::ZipWriter::setComment | ( | const char * | str | ) |
Referenced by Sandbox::DocumentSaverThread::run(), Gui::AutoSaver::saveDocument(), and App::Document::saveToFile().
◆ setLevel()
| void Base::ZipWriter::setLevel | ( | int | level | ) |
◆ Stream()
|
virtual |
Implements Base::Writer.
Referenced by Base::Persistence::dumpToStream(), App::Document::exportObjects(), and App::Document::saveToFile().
◆ writeFiles()
|
virtual |
process the requested file storing
Implements Base::Writer.
References Base::Writer::FileList, Base::Writer::FileEntry::FileName, Base::Writer::FileEntry::Object, zipios::ZipOutputStream::putNextEntry(), and Base::Persistence::SaveDocFile().
Referenced by Base::Persistence::dumpToStream(), App::Document::exportObjects(), Sandbox::DocumentSaverThread::run(), Gui::AutoSaver::saveDocument(), and App::Document::saveToFile().
The documentation for this class was generated from the following files:
- src/Base/Writer.h
- src/Base/Writer.cpp
Public Member Functions inherited from
1.8.17