ecolab::Checkpointable_file Class Reference

checkpointable binary file writer More...

#include <CheckpointableFile.h>

Collaboration diagram for ecolab::Checkpointable_file:
Collaboration graph

Public Member Functions

 Checkpointable_file (const std::string &name)
 
void open (const std::string &n, const char *mode="w")
 open file n in mode mode (taking modes acceptible to fopen)
 
void close ()
 
bool opened () const
 
void write (const void *buf, std::size_t size, std::size_t nobj)
 low level write call - like std::fwrite
 
template<class T , class A >
void write (const std::vector< T, A > &buf)
 write a vector of data
 
template<class T >
Checkpointable_fileoperator<< (const T &x)
 stream data as text like std::iostream
 
void pack (classdesc::pack_t &buf) const
 
void unpack (classdesc::pack_t &buf)
 

Detailed Description

checkpointable binary file writer

A Checkpointable file is one that saves its current cursor position and filename when serialised, so that when restored, writes will continue from where it left off. Only write operations are supported on Checkpointable_file.


The documentation for this class was generated from the following file: