|
FreeCAD C++
|
#include <Base/Writer.h>
The Writer class This is an important helper class for the store and retrieval system of persistent objects in FreeCAD.
Public Member Functions | |
| void | setForceXML (bool on) |
| switch the writer in XML only mode (no files allowed) | |
| bool | isForceXML (void) |
| check on state | |
| void | insertAsciiFile (const char *FileName) |
| insert a file as CDATA section in the XML file | |
| void | insertBinFile (const char *FileName) |
| insert a binary file BASE64 coded as CDATA section in the XML file | |
additional file writing | |
| std::string | addFile (const char *Name, const Base::Persistence *Object) |
| add a write request of a persistent object | |
| virtual void | writeFiles (void)=0 |
| process the requested file storing | |
| const std::vector< std::string > & | getFilenames () const |
| get all registered file names | |
| void | setMode (const std::string &mode) |
| Set mode. | |
| void | setModes (const std::set< std::string > &modes) |
| Set modes. | |
| bool | getMode (const std::string &mode) const |
| Get mode. | |
| std::set< std::string > | getModes () const |
| Get modes. | |
| void | clearMode (const std::string &mode) |
| Clear mode. | |
| void | clearModes () |
| Clear modes. | |
Error handling | |
| void | addError (const std::string &) |
| bool | hasErrors () const |
| void | clearErrors () |
| std::vector< std::string > | getErrors () const |
pretty formatting for XML | |
| const char * | ind (void) const |
| get the current indentation | |
| void | incInd (void) |
| increase indentation by one tab | |
| void | decInd (void) |
| decrease indentation by one tab | |
Public Attributes | |
| std::string | ObjectName |
| name for underlying file saves | |
1.8.15