output_prefix Class Reference

#include <prefix.h>

Inheritance diagram for output_prefix:

output

Public Member Functions

virtual ~output_prefix ()

Static Public Member Functions

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

Protected Member Functions

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

Private Member Functions

 output_prefix (const output::pointer &deeper, const char *prefix)
 output_prefix ()
 output_prefix (const output_prefix &)
output_prefixoperator= (const output_prefix &)

Private Attributes

output::pointer deeper
nstring prefix
int column
long pos

Detailed Description

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

Definition at line 31 of file prefix.h.


Constructor & Destructor Documentation

virtual output_prefix::~output_prefix (  )  [virtual]

The destructor.

output_prefix::output_prefix ( const output::pointer deeper,
const char *  prefix 
) [private]

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

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

output_prefix::output_prefix (  )  [private]

The default constructor. Do not use.

output_prefix::output_prefix ( const output_prefix  )  [private]

The copy constructor. Do not use.


Member Function Documentation

static pointer output_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:
deeper the deeper output stream on which this filter writes to.
prefix the prefix to be added to each line.

nstring output_prefix::filename (  )  const [protected, virtual]

The filename method is used to obtain the filename of this output.

Implements output.

long output_prefix::ftell_inner (  )  const [protected, virtual]

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

Implements output.

void output_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.

Implements output.

int output_prefix::page_width (  )  const [protected, virtual]

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

Reimplemented from output.

int output_prefix::page_length (  )  const [protected, virtual]

The page_length method is used to obtain the length of the page of the output device.

Reimplemented from output.

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

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

Implements output.

void output_prefix::end_of_line_inner (  )  [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.

Implements output.

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

The flush_inner method is called by the flush method once all the data has been written. The default implementation does nothing.

Reimplemented from output.

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

The assignment operator. Do not use.


Field Documentation

The deeper instance variable is used to remember the deeper output stream on which this filter writes to.

Definition at line 94 of file prefix.h.

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

Definition at line 100 of file prefix.h.

int output_prefix::column [private]

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

Definition at line 106 of file prefix.h.

long output_prefix::pos [private]

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

Definition at line 112 of file prefix.h.


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

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