wide_output_to_narrow Class Reference

#include <to_narrow.h>

Inheritance diagram for wide_output_to_narrow:

wide_output

Public Member Functions

virtual ~wide_output_to_narrow ()

Static Public Member Functions

static pointer open (const output::pointer &deeper)

Protected Member Functions

nstring filename ()
int page_width ()
int page_length ()
const char * type_name () const
void write_inner (const wchar_t *data, size_t len)
void flush_inner ()
void end_of_line_inner ()

Private Member Functions

 wide_output_to_narrow (const output::pointer &deeper)
 wide_output_to_narrow ()
 wide_output_to_narrow (const wide_output_to_narrow &)
wide_output_to_narrowoperator= (const wide_output_to_narrow &)

Private Attributes

output::pointer deeper
mbstate_t state
bool prev_was_newline

Detailed Description

The wide_output_to_narrow class represents the filtering necessary to convert a wide output stream into a narrow (multi-byte-char) output stream.

Definition at line 31 of file to_narrow.h.


Constructor & Destructor Documentation

virtual wide_output_to_narrow::~wide_output_to_narrow (  )  [virtual]

The destructor.

wide_output_to_narrow::wide_output_to_narrow ( const output::pointer deeper  )  [private]

The constructor. It is private on purpose, use the open class method instead.

Parameters:
deeper where to write the filtered output

wide_output_to_narrow::wide_output_to_narrow (  )  [private]

The default constructor. Do not use.

wide_output_to_narrow::wide_output_to_narrow ( const wide_output_to_narrow  )  [private]

The copy constructor. Do not use.


Member Function Documentation

static pointer wide_output_to_narrow::open ( const output::pointer deeper  )  [static]

The open class method is used to create new dynamically alocated instances of this class.

Parameters:
deeper where to write the filtered output

nstring wide_output_to_narrow::filename (  )  [protected, virtual]

The filename method is used to obtain the name of the file being written by this output stream.

Returns:
the name of the destination

Implements wide_output.

int wide_output_to_narrow::page_width (  )  [protected, virtual]

The page-width method is used to obtain the width (in printing columns) of the output destination.

Implements wide_output.

int wide_output_to_narrow::page_length (  )  [protected, virtual]

The length method is used to obtain the length (in whole lines) of the output destination.

Implements wide_output.

const char* wide_output_to_narrow::type_name (  )  const [protected, virtual]

The type_name method is used to return the name of the class of output. Useful for debugging.

Implements wide_output.

void wide_output_to_narrow::write_inner ( const wchar_t *  data,
size_t  len 
) [protected, virtual]

The write_inner method is called by the write method to emit buffered data.

Parameters:
data The data to be written
len The number of wide characters to be written

Implements wide_output.

void wide_output_to_narrow::flush_inner (  )  [protected, virtual]

The flush_inner method is called by the flush method, after it writes any buffered data via the write_inner method.

Implements wide_output.

void wide_output_to_narrow::end_of_line_inner (  )  [protected, virtual]

The end_of_line_inner method is used to do end-of-line processing by the derived class, if the buffered character state is not sufficient for the end_of_line method to determine whether or not the output position is currently at the start of a line.

Implements wide_output.

wide_output_to_narrow& wide_output_to_narrow::operator= ( const wide_output_to_narrow  )  [private]

The assignment operator. Do not use.


Field Documentation

Definition at line 83 of file to_narrow.h.

mbstate_t wide_output_to_narrow::state [private]

Definition at line 84 of file to_narrow.h.

Definition at line 85 of file to_narrow.h.


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

Generated on Wed Mar 12 23:37:45 2008 for Aegis by  doxygen 1.5.5