output_indent Class Reference
#include <indent.h>
Detailed Description
The
output_indent class is used to represent an
output stream which automatically indents its C-like
input.
Definition at line 29 of file indent.h.
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
INDENT |
This defines the width of a tab on output. |
Definition at line 101 of file indent.h.
Constructor & Destructor Documentation
virtual output_indent::~output_indent |
( |
|
) |
[virtual] |
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. |
output_indent::output_indent |
( |
|
) |
[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. |
void output_indent::indent_more |
( |
|
) |
|
The indent_more method is used to increase the indenting beyond the automatically calculated indent.
- Note:
- There must be a matching indent_less call.
void output_indent::indent_less |
( |
|
) |
|
The indent_less function is used to decrease the indenting to less than the automatically calculated indent.
- Note:
- There must be a matching indent_more call.
nstring output_indent::filename |
( |
|
) |
const [protected, virtual] |
The filename method is used to obtain the filename of this output.
Implements output.
const char* output_indent::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.
long output_indent::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_indent::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.
void output_indent::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.
int output_indent::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_indent::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.
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 112 of file indent.h.
The depth instance variable is used to remember the current level of indenting. Will never be negative.
Definition at line 118 of file indent.h.
The in_col instance variable is used to remember the current input column. This can differe from the output column when white space is being optimized.
Definition at line 125 of file indent.h.
The out_col instance variable is used to remember the current output column.
Definition at line 131 of file indent.h.
The continuation_line instance variable is used to remember whether or not the current line is a continuation line.
State 0 means that it is not, state 1 means that a backslash (\) has been seen, and state 2 means that "\\\n" has been seen.
Definition at line 140 of file indent.h.
The pos instance variable is used to remember the current output position.
Definition at line 146 of file indent.h.
The documentation for this class was generated from the following file: