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

#include <string.h>

Inheritance diagram for output_string:
output

Public Types

typedef boost::shared_ptr
< output_string
pointer

Public Member Functions

virtual ~output_string ()
rcstring mkstr (void) const

Static Public Member Functions

static pointer create (int line_width)

Protected Member Functions

void put (char c)
int get_column (void) const
int get_line_width (void) const

Private Member Functions

 output_string (int linlen)
 output_string ()
 output_string (const output_string &rhs)
output_stringoperator= (const output_string &rhs)

Private Attributes

int linlen
int column
rcstring_accumulator acc

Detailed Description

The output_string class is used to represent the processing required to send output to a string.

Definition at line 29 of file string.h.


Member Typedef Documentation

typedef boost::shared_ptr<output_string> output_string::pointer

Reimplemented from output.

Definition at line 33 of file string.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 22 of file string.cc.

output_string::output_string ( int  linlen) [private]

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

Definition at line 27 of file string.cc.

The default constructor. Do not use.

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

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

output_string::pointer output_string::create ( int  line_width) [static]

The create class method is used to create new dynamically allocated instances of this class.

Definition at line 35 of file string.cc.

int output_string::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 79 of file string.cc.

int output_string::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 71 of file string.cc.

rcstring output_string::mkstr ( void  ) const

The mkstr method is sued to obtain the value of the output as a string.

Definition at line 63 of file string.cc.

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

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void output_string::put ( char  c) [protected, 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 42 of file string.cc.


Field Documentation

The acc instance variable is used to remember the text of the output.

Definition at line 84 of file string.h.

int output_string::column [private]

The column instance variable is used to remember the present column position of the write location.

Definition at line 78 of file string.h.

int output_string::linlen [private]

The linlen instance variable is used to remember the maximum desired output line width.

Definition at line 72 of file string.h.


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