Target manager that allow us to write in a std::ostream. More...
#include <png.hpp>
Public Member Functions | |
target_manager (std::ostream &os) | |
Constructor. | |
void | write (png_bytep data, png_size_t length) |
Write data in the ouput stream. | |
void | flush () |
Flush the output stream. | |
Private Attributes | |
std::ostream & | m_output |
The stream in which we write the data. |
Target manager that allow us to write in a std::ostream.
Definition at line 163 of file png.hpp.
claw::graphic::png::writer::target_manager::target_manager | ( | std::ostream & | os | ) |
Constructor.
os | The stream in which we write. |
Definition at line 72 of file png_writer.cpp.
References CLAW_PRECOND.
00073 : m_output(os) 00074 { 00075 CLAW_PRECOND( !!os ); 00076 } // png::writer::target_manager::target_manager()
void claw::graphic::png::writer::target_manager::flush | ( | ) |
Flush the output stream.
Definition at line 94 of file png_writer.cpp.
References m_output.
00095 { 00096 m_output.flush(); 00097 } // png::writer::target_manager::flush()
void claw::graphic::png::writer::target_manager::write | ( | png_bytep | data, | |
png_size_t | length | |||
) |
Write data in the ouput stream.
data | (out) Array of the bytes to write. | |
length | Number of bytes to write. |
Definition at line 85 of file png_writer.cpp.
00086 { 00087 m_output.write( (char*)data, length * sizeof(png_byte) ); 00088 } // png::writer::target_manager::write()
std::ostream& claw::graphic::png::writer::target_manager::m_output [private] |