output_prefix Class Reference
#include <prefix.h>
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] |
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.
The copy constructor. Do not use.
Member Function Documentation
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.
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.
The prefix instance variable is used to remember the current output column.
Definition at line 106 of file prefix.h.
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: