Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
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 (void) const
nstring type_name (void) const
long ftell_inner (void) const
void write_inner (const void *data, size_t length)
void end_of_line_inner (void)
void flush_inner (void)

Private Member Functions

 output_pager ()
void pipe_open (void)
void pager_error (void)
 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 30 of file pager.h.


Constructor & Destructor Documentation

virtual output_pager::~output_pager ( ) [virtual]

The destructor.

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

void output_pager::end_of_line_inner ( void  ) [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.

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

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

Implements output.

void output_pager::flush_inner ( void  ) [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.

long output_pager::ftell_inner ( void  ) const [protected, virtual]

The ftell_inner method is used to determine the current file position, without taking the buffering into account.

Implements output.

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.

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

The assignment operator. Do not use.

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

The set class method is used to

Parameters:
flagThe command line flag: 0 means --no-pager, 1 means --pager
usageThe function to call toi print a command line usage message and exit.
nstring output_pager::type_name ( void  ) const [protected, virtual]

The type_name method is used to determine the name of this output device or file or type.

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.


Field Documentation

bool output_pager::bol [private]

Definition at line 95 of file pager.h.

Definition at line 94 of file pager.h.

int output_pager::pid [private]

Definition at line 93 of file pager.h.

void* output_pager::vdeeper [private]

Definition at line 92 of file pager.h.


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