Claw  1.7.3
Public Member Functions | List of all members
claw::buffered_ostream< Stream > Class Template Reference

This class is made to help writing in ostreams with a buffer. More...

#include <buffered_ostream.hpp>

Public Member Functions

 buffered_ostream (stream_type &f, unsigned int buffer_size=1024)
 Constructor.
 ~buffered_ostream ()
 Destructor.
template<typename T >
void write (T v)
 Write somethnig in the buffer.
void write (const char *p, unsigned int n)
 Write a range of data in the buffer.
void flush ()
 Write the data from the buffer in the stream.

Detailed Description

template<typename Stream>
class claw::buffered_ostream< Stream >

This class is made to help writing in ostreams with a buffer.

Author
Julien Jorge

Definition at line 40 of file buffered_ostream.hpp.

Constructor & Destructor Documentation

template<typename Stream >
claw::buffered_ostream< Stream >::buffered_ostream ( stream_type &  f,
unsigned int  buffer_size = 1024 
)

Constructor.

Parameters
fThe file associated to the stream.
buffer_sizeThe size of the buffer.

Definition at line 40 of file buffered_ostream.tpp.

Member Function Documentation

template<typename Stream >
template<typename T >
void claw::buffered_ostream< Stream >::write ( v)

Write somethnig in the buffer.

Parameters
vThe value to write.

Definition at line 65 of file buffered_ostream.tpp.

template<typename Stream >
void claw::buffered_ostream< Stream >::write ( const char *  p,
unsigned int  n 
)

Write a range of data in the buffer.

Parameters
pThe begining of the range to write.
nThe length of the buffer pointed by p.

Definition at line 77 of file buffered_ostream.tpp.


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