Definition
The type encoding_ofstream<Coder> is the encoding counterpart of the type ofstream from the C++ iostream library. Each instance os of type encoding_ofstream<Coder> is associated with a file. Every data that is written to os is encoded on-the-fly by an instance of type Coder and then written to the associated file. All operations and all operators («) defined for C++ ostreams can be applied to encoding_ofstream as well.
#include < LEDA/coding/coder_util.h >
Creation
encoding_ofstream<Coder> | os(const char* file_name = 0, ios::openmode mode = ios::openmode(ios::out | ios::trunc)) | |
creates an instance os. If file_name is specified, the stream is attached to the file with the given name. |
Operations