CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
Public Member Functions | Private Attributes
claw::graphic::png::writer::target_manager Struct Reference

Target manager that allow us to write in a std::ostream. More...

#include <png.hpp>

List of all members.

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.

Detailed Description

Target manager that allow us to write in a std::ostream.

Author:
Julien Jorge

Definition at line 163 of file png.hpp.


Constructor & Destructor Documentation

claw::graphic::png::writer::target_manager::target_manager ( std::ostream &  os)

Constructor.

Parameters:
osThe stream in which we write.

Definition at line 72 of file png_writer.cpp.

References CLAW_PRECOND.

  : m_output(os)
{
  CLAW_PRECOND( !!os );
} // png::writer::target_manager::target_manager()

Member Function Documentation

void claw::graphic::png::writer::target_manager::flush ( )

Flush the output stream.

Definition at line 94 of file png_writer.cpp.

Referenced by claw__graphic__png__target_manager__flush().

{
  m_output.flush();
} // 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.

Parameters:
data(out) Array of the bytes to write.
lengthNumber of bytes to write.

Definition at line 85 of file png_writer.cpp.

Referenced by claw__graphic__png__target_manager__write().

{
  m_output.write( (char*)data, length * sizeof(png_byte) );
} // png::writer::target_manager::write()

Member Data Documentation

The stream in which we write the data.

Definition at line 173 of file png.hpp.


The documentation for this struct was generated from the following files: