Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
#include <file_bitwriter.hpp>
Inheritance diagram for file_bitwriter:
This class creates a file and writes to it. Unlike the stream_bitwriter it manages the file that it operates on, and thus hides the details of file access.
It adds the member function error(), which checks if there was an error creating the file in the constructor.
Definition at line 33 of file file_bitwriter.hpp.
Public Member Functions | |
file_bitwriter (const char *name) | |
Constructor. | |
bool | error () const |
Check the state of the file. | |
Protected Member Functions | |
void | write_next_byte (char c) |
Defines the method of writing a single byte of output. | |
Protected Attributes | |
std::ofstream | s |
|
Constructor.
Definition at line 38 of file file_bitwriter.hpp.
00038 : s(name, std::ios::binary) { ; } |
|
Check the state of the file.
Reimplemented from bitwriter. Definition at line 44 of file file_bitwriter.hpp. Referenced by OctaneTester::RunCommand_Compress(), OctaneTester::RunCommand_Decompress(), and OctaneTester::RunCommand_SaveCompressor().
00044 { return !s; }
|
|
Defines the method of writing a single byte of output. Derived classes should implement this function.
Implements bitwriter. Definition at line 47 of file file_bitwriter.hpp.
00047 { s.put(c); } |