nis-util  1.0.D108
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
output_file Class Reference

#include <file.h>

Inheritance diagram for output_file:
output

Public Member Functions

virtual ~output_file ()
void put (char c)

Static Public Member Functions

static pointer create (const rcstring &filename)

Protected Member Functions

 output_file (const rcstring &filename)
int get_column (void) const
int get_line_width (void) const

Private Member Functions

 output_file ()
 output_file (const output_file &rhs)
output_fileoperator= (const output_file &rhs)

Private Attributes

FILE * fp
int column

Detailed Description

The output_file class is used to represent writing to an actual file.

Definition at line 29 of file file.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 28 of file file.cc.

output_file::output_file ( const rcstring filename) [protected]

The constructor.

Parameters:
filenameThe name of the file to be written, or "-" for the standard output.

Definition at line 46 of file file.cc.

output_file::output_file ( ) [private]

The default constructor. Do not use.

output_file::output_file ( const output_file rhs) [private]

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

output_file::pointer output_file::create ( const rcstring filename) [static]

The create class method is sued to create new dynamically allocated instance of this class.

Parameters:
filenameThe name of the file to be written, or "-" for the standard output.

Definition at line 54 of file file.cc.

int output_file::get_column ( void  ) const [protected, virtual]

The get_column method is used to obtain the current output column position.

Note:
It does not understand multi-byte character encodings.

Implements output.

Definition at line 82 of file file.cc.

int output_file::get_line_width ( void  ) const [protected, virtual]

The get_line_width method is used to obtain the width of lines in the output. This may vary depending on what filtering is present.

Implements output.

Definition at line 90 of file file.cc.

output_file& output_file::operator= ( const output_file rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void output_file::put ( char  c) [virtual]

The put method is used to write a character to the output file. Each derived class is required to override this with their own implementation.

Parameters:
cThe character to be written.

Implements output.

Definition at line 61 of file file.cc.


Field Documentation

int output_file::column [private]

The column instance variable is used to remember which column the writing position is at.

Note:
It does not understand multi-byte characters.

Definition at line 81 of file file.h.

FILE* output_file::fp [private]

The fp instance variable is used to remember the open FILE structure.

Definition at line 72 of file file.h.


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