Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
wide_output_truncate Class Reference

#include <truncate.h>

Inheritance diagram for wide_output_truncate:
wide_output

Public Member Functions

virtual ~wide_output_truncate ()

Static Public Member Functions

static pointer open (const wide_output::pointer &deeper, int width)

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_truncate (const wide_output::pointer &deeper, int width)
 wide_output_truncate ()
 wide_output_truncate (const wide_output_truncate &)
wide_output_truncateoperator= (const wide_output_truncate &)

Private Attributes

wide_output::pointer deeper
int width
wstring_accumulator buf
int column

Detailed Description

The wide_output_truncate class is used to truncate lines to a specified printing width. Characters beyond on each line this limit are discarded.

Definition at line 31 of file truncate.h.


Constructor & Destructor Documentation

The destructor.

wide_output_truncate::wide_output_truncate ( const wide_output::pointer deeper,
int  width 
) [private]

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

Parameters:
deeperwhere to write the filtered output
widththe width to crop to, or -1 if should use deeper->page_width

Member Function Documentation

void wide_output_truncate::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.

nstring wide_output_truncate::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.

void wide_output_truncate::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.

static pointer wide_output_truncate::open ( const wide_output::pointer deeper,
int  width 
) [static]

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

Parameters:
deeperwhere to write the filtered output
widththe width to crop to, or -1 if should use deeper->page_width
wide_output_truncate& wide_output_truncate::operator= ( const wide_output_truncate ) [private]
int wide_output_truncate::page_length ( ) [protected, virtual]

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

Implements wide_output.

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

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

Implements wide_output.

const char* wide_output_truncate::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_truncate::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:
dataThe data to be written
lenThe number of wide characters to be written

Implements wide_output.


Field Documentation

Definition at line 91 of file truncate.h.

Definition at line 93 of file truncate.h.

Definition at line 87 of file truncate.h.

Definition at line 89 of file truncate.h.


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