Aegis  4.25.D505
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
col Class Reference

#include <col.h>

Inheritance diagram for col:
col_pretty col_unformatted

Public Types

typedef aegis_shared_ptr< colpointer

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)
virtual void title (const nstring &first, const nstring &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)
static col::pointer open (output::pointer op)

Protected Member Functions

 col ()

Private Member Functions

 col (const col &)
coloperator= (const col &)

Detailed Description

The col class is used to represent an output capable of hosting multi-column output.

Definition at line 30 of file col.h.


Member Typedef Documentation

Definition at line 33 of file col.h.


Constructor & Destructor Documentation

virtual col::~col ( ) [virtual]

The destructor.

col::col ( ) [protected]

The default constructor.

col::col ( const col ) [private]

The copy constructor. Do not use.


Member Function Documentation

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.

Parameters:
leftthe 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.)
rightthe right-hand edge of the column, plus one. zero means the rest of the line
titlethe column title to use. Give NULL pointer for none.
Returns:
output::pointer ; a pointer to an output stream to be used to write into this column. Use the delete operator when you are done with the column.

Implemented in col_unformatted, and col_pretty.

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_unformatted, and col_pretty.

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_unformatted, and col_pretty.

virtual void col::flush ( ) [pure virtual]

The flush method is used to force output of all buffered data.

Implemented in col_unformatted, and col_pretty.

virtual void col::forget ( const output::pointer op) [pure virtual]

The forget method is used to discontinue an output column.

Parameters:
opThe column to forget.

Implemented in col_unformatted, and col_pretty.

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.

Parameters:
nthe number of lines, not counting the blank line.

Implemented in col_unformatted, and col_pretty.

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.

Parameters:
filenamename of file to write, pager is used if NULL pointer given.
static col::pointer col::open ( output::pointer  op) [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.

Parameters:
opthe file to write the data to
col& col::operator= ( const col ) [private]

The assignment operator. Do not use.

virtual void col::title ( const char *  first,
const char *  second 
) [virtual]

The title method is used to set the two lines of page headings. These are ignored for unformatted output.

Parameters:
firstfirst line of heading, NULL means blank
secondsecond line of heading, NULL means blank
virtual void col::title ( const nstring first,
const nstring second 
) [pure virtual]

The title method is used to set the two lines of page headings. These are ignored for unformatted output.

Parameters:
firstfirst line of heading, NULL means blank
secondsecond line of heading, NULL means blank

Implemented in col_unformatted, and col_pretty.


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