15 #ifndef BORNAGAIN_GUI_SUPPORT_XML_BACKUP_H
16 #define BORNAGAIN_GUI_SUPPORT_XML_BACKUP_H
18 #include "Base/Util/Assert.h"
27 QXmlStreamWriter w(&backup);
28 w.writeStartElement(
"backup");
30 const_cast<T*
>(t)->serialize(s);
38 QXmlStreamReader r(backup);
40 r.readNextStartElement();
41 ASSERT(r.name() ==
"backup");
Supports serialization to or deserialization from QXmlStream.
void restoreBackup(T *t, const QByteArray &backup)
QByteArray createBackup(const T *t)
void copyContents(const T *source, T *dest)