| 197 | } |
| 198 | |
| 199 | void Persistence::dumpToStream(std::ostream& stream, int compression) |
| 200 | { |
| 201 | // we need to close the zipstream to get a good result, the only way to do this is to delete the |
| 202 | // ZipWriter. Hence the scope... |
| 203 | { |
| 204 | // create the writer |
| 205 | Base::ZipWriter writer(stream); |
| 206 | writer.setLevel(compression); |
| 207 | writer.putNextEntry("Persistence.xml"); |
| 208 | writer.setMode("BinaryBrep"); |
| 209 | |
| 210 | // save the content (we need to encapsulate it with xml tags to be able to read single |
| 211 | // element xmls like happen for properties) |
| 212 | writer.Stream() << "<Content>" << std::endl; |
| 213 | Save(writer); |
| 214 | writer.Stream() << "</Content>"; |
| 215 | writer.writeFiles(); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | void Persistence::restoreFromStream(std::istream& stream) |
| 220 | { |
no test coverage detected