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)=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 &)
coloperator= (const col &)

Detailed Description

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

Definition at line 32 of file col.h.


Member Typedef Documentation

Definition at line 35 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

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:
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.

Parameters:
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.
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_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.

Parameters:
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.

Parameters:
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.

Parameters:
op The column to forget.

Implemented in col_pretty, and col_unformatted.

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

The assignment operator. Do not use.


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

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