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

#include <prefix.h>

Inheritance diagram for output_filter_prefix:
output_filter output

Public Member Functions

virtual ~output_filter_prefix ()

Static Public Member Functions

static pointer create (const output::pointer &deeper, const char *prefix)

Protected Member Functions

long ftell_inner (void) const
void write_inner (const void *data, size_t length)
int page_width (void) const
nstring type_name (void) const
void end_of_line_inner (void)

Private Member Functions

 output_filter_prefix (const output::pointer &deeper, const nstring &prefix)
 output_filter_prefix ()
 output_filter_prefix (const output_filter_prefix &)
output_filter_prefixoperator= (const output_filter_prefix &)

Private Attributes

nstring prefix
nstring prefix0
int column
long pos
int width

Detailed Description

The output_filter_prefix class is used to represent an output stream filter which adds a prefix to every line of output.

Definition at line 29 of file prefix.h.


Constructor & Destructor Documentation

The destructor.

output_filter_prefix::output_filter_prefix ( const output::pointer deeper,
const nstring prefix 
) [private]

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

Parameters:
deeperthe deeper output stream on which this filter writes to.
prefixthe prefix to be added to each line.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

static pointer output_filter_prefix::create ( const output::pointer deeper,
const char *  prefix 
) [static]

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

Parameters:
deeperthe deeper output stream on which this filter writes to.
prefixthe prefix to be added to each line.
void output_filter_prefix::end_of_line_inner ( void  ) [protected, virtual]

The end_of_line_inner method is used to ensure that the current output position is at the beginning of a line, without taking the buffering into account.

Reimplemented from output_filter.

long output_filter_prefix::ftell_inner ( void  ) const [protected, virtual]

The ftell_inner method is used to determine the current file position, without taking the buffering into account.

Reimplemented from output_filter.

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

The assignment operator. Do not use.

int output_filter_prefix::page_width ( void  ) const [protected, virtual]

The page_width method is used to obtain the width of the page of the output device.

Reimplemented from output_filter.

nstring output_filter_prefix::type_name ( void  ) const [protected, virtual]

The type_name method is used to determine the name of this output device or file or type.

Reimplemented from output_filter.

void output_filter_prefix::write_inner ( const void *  data,
size_t  length 
) [protected, virtual]

The write_inner method is used write data to the output, without taking the buffering into account.

Reimplemented from output_filter.


Field Documentation

The prefix instance variable is used to remember the current output column.

Definition at line 93 of file prefix.h.

long output_filter_prefix::pos [private]

The pos instance variable is used to remember the current output position.

Definition at line 99 of file prefix.h.

The prefix instance variable is used to remember the prefix to be added to each line.

Definition at line 81 of file prefix.h.

The prefix0 instance variable is used to remember the prefix to be added to each line, if the line is empty.

Definition at line 87 of file prefix.h.

The width instance variable is used to remember the avauilable output width, once the prefix has been subtracted.

Definition at line 105 of file prefix.h.


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