output_pager Class Reference

#include <pager.h>

Inheritance diagram for output_pager:

output

Public Member Functions

virtual ~output_pager ()

Static Public Member Functions

static void set (int flag, void(*usage)(void))
static pointer open (void)
static void cleanup (void)

Protected Member Functions

nstring filename () const
const char * type_name () const
long ftell_inner () const
void write_inner (const void *data, size_t length)
void end_of_line_inner ()
void flush_inner ()

Private Member Functions

 output_pager ()
void pipe_open ()
void pager_error ()
 output_pager (const output_pager &)
output_pageroperator= (const output_pager &)

Private Attributes

void * vdeeper
int pid
nstring pager
bool bol

Detailed Description

The output_pager class is used to represent an output stream which is run thropugh a paginator onto the users terminal. This is controlled by the PAGER environment variable.

Definition at line 31 of file pager.h.


Constructor & Destructor Documentation

virtual output_pager::~output_pager (  )  [virtual]

The destructor.

output_pager::output_pager (  )  [private]

The default constructor. It is private on purpose, use the open class method instead.

output_pager::output_pager ( const output_pager  )  [private]

The copy constructor. Do not use.


Member Function Documentation

static void output_pager::set ( int  flag,
void(*)(void)  usage 
) [static]

The set class method is used to

Parameters:
flag The command line flag: 0 means --no-pager, 1 means --pager
usage The function to call toi print a command line usage message and exit.

static pointer output_pager::open ( void   )  [static]

The open class method is used to create a paginated output stream if the output is to a terminal, and if the user has not prevented it with a command line option.

static void output_pager::cleanup ( void   )  [static]

The cleanup class method is called at quit() time to cleanup any output pager than may still be running. This function shall only be called by the quit_action_pager class.

nstring output_pager::filename (  )  const [protected, virtual]

The filename method is used to obtain the filename of this output.

Implements output.

const char* output_pager::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_pager::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_pager::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_pager::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_pager::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.

void output_pager::pipe_open (  )  [private]

void output_pager::pager_error (  )  [private]

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

The assignment operator. Do not use.


Field Documentation

void* output_pager::vdeeper [private]

Definition at line 93 of file pager.h.

int output_pager::pid [private]

Definition at line 94 of file pager.h.

Definition at line 95 of file pager.h.

bool output_pager::bol [private]

Definition at line 96 of file pager.h.


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

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