#include <col.h>
Public Types | |
typedef aegis_shared_ptr< col > | pointer |
Public Member Functions | |
virtual | ~col () |
virtual output::pointer | create (int left, int right, const char *title)=0 |
virtual void | title (const char *first, const char *second)=0 |
virtual void | eoln ()=0 |
virtual void | need (int n)=0 |
virtual void | eject ()=0 |
virtual void | flush ()=0 |
virtual void | forget (const output::pointer &op)=0 |
Static Public Member Functions | |
static col::pointer | open (struct string_ty *filename) |
Protected Member Functions | |
col () | |
Private Member Functions | |
col (const col &) | |
col & | operator= (const col &) |
Definition at line 32 of file col.h.
typedef aegis_shared_ptr<col> col::pointer |
virtual col::~col | ( | ) | [virtual] |
The destructor.
col::col | ( | ) | [protected] |
The default constructor.
col::col | ( | const col & | ) | [private] |
The copy constructor. Do not use.
static col::pointer col::open | ( | struct string_ty * | filename | ) | [static] |
The open class method is a factory used to open a file for outputting columnar data.
The style of formatting is controlled by the -UNFormatted option.
Use the delete operator when you are done with it.
filename | name of file to write, pager is used if NULL pointer given. |
virtual output::pointer col::create | ( | int | left, | |
int | right, | |||
const char * | title | |||
) | [pure virtual] |
The create method is used to specify a range of locations for an output column.
The contents will be de-tabbed and wrapped before output.
left | the left-hand edge of the column. If you say -1, it will use the righ-hand side of the previous column, plus one. (Note: NOT the right-most column.) | |
right | the right-hand edge of the column, plus one. zero means the rest of the line | |
title | the column title to use. Give NULL pointer for none. |
Implemented in col_pretty, and col_unformatted.
virtual void col::title | ( | const char * | first, | |
const char * | second | |||
) | [pure virtual] |
The title method is used to set the two lines of page headings. These are ignored for unformatted output.
first | first line of heading, NULL means blank | |
second | second line of heading, NULL means blank |
Implemented in col_pretty, and col_unformatted.
virtual void col::eoln | ( | ) | [pure virtual] |
The eoln method is used to signal that an entire line of columns has been assembled and that it should be emitted to the output file or pager.
Columns all receive an implicit newline, and are flushed before processing. All of the columns are thus aligned into rows, even when (due to newlines or wrapping) they would otherwise be different lengths.
This is the interface used by clients of this subsystem.
Implemented in col_pretty, and col_unformatted.
virtual void col::need | ( | int | n | ) | [pure virtual] |
The need method is used to nominate that a number of lines is needed before the end of the page. If the lines are available, a blank line is emitted, otherwise a new page is thrown.
n | the number of lines, not counting the blank line. |
Implemented in col_pretty, and col_unformatted.
virtual void col::eject | ( | ) | [pure virtual] |
The eject method is used to move to the top of the next page, if we aren't there already.
Implemented in col_pretty, and col_unformatted.
virtual void col::flush | ( | ) | [pure virtual] |
The flush method is used to force output of all buffered data.
Implemented in col_pretty, and col_unformatted.
virtual void col::forget | ( | const output::pointer & | op | ) | [pure virtual] |
The forget method is used to discontinue an output column.
op | The column to forget. |
Implemented in col_pretty, and col_unformatted.