class oeiofstream : public oeofstream
This class represents a file that can be both written to and read from at the same time. Note, it inherits from oeofstream and can generally be used as an output file stream. The major distinction being that the oeiofstream.pread method can be used to read data back from the file provided oeostream.flush has been called.
The following methods are publicly inherited from oeofstream:
oeiofstream() oeiofstream(const char *filename) oeiofstream(const std::string &filename)
Default and copy constructors.
oesize_t pread(char *buffer, oesize_t len, oefpos_t offset) const
Reads ‘len’ bytes into ‘buffer’ at the specified ‘offset’ in the file. Returns the number of bytes actually read. This method allows multiple threads to safely read from a single file descriptor.
The flush method must be called before data written to this stream can be seen by the pread method.