6.71 ABA_OSTREAM Class Reference

Class implements an output stream which can be turned on and off at run time, i.e., if the output stream is turned off, then no messages written by the operator << reach the associated “real” output stream.

#include <ostream.h>

Inheritance diagram for ABA_OSTREAM::


PIC


Public Member Functions

Private Attributes

Friends

6.71.1 Detailed Description

Class implements an output stream which can be turned on and off at run time, i.e., if the output stream is turned off, then no messages written by the operator << reach the associated “real” output stream.

Definition at line 64 of file ostream.h.

6.71.2 Constructor & Destructor Documentation

6.71.2.1 ABA_OSTREAM::ABA_OSTREAM (ostream & out, const char * logStreamName = 0)

The constructor turns the output on and associates it with a “real” stream.

Parameters:

out
The “real” stream (usually cout or cerr.)}
logStreamName
If logStreamName is not 0, then the output also directed to a log-file with this name. The default value of logStreamName is 0.

6.71.2.2 ABA_OSTREAM::~ABA_OSTREAM ()

The destructor.

6.71.3 Member Function Documentation

6.71.3.1 ABA_OSTREAM& ABA_OSTREAM::operator<< (char o)

Reimplementation for all fundamental types, for const char *, and for some other classes listed below.

output operator <<

If the output is turned on the operator of the base class ostream is called. If also the output to the logfile is turned on, we write the same message also to the log-file.

return A reference to the output stream.

Parameters:

o
The item being output.

6.71.3.2 ABA_OSTREAM& ABA_OSTREAM::operator<< (unsigned char o)

6.71.3.3 ABA_OSTREAM& ABA_OSTREAM::operator<< (signed char o)

6.71.3.4 ABA_OSTREAM& ABA_OSTREAM::operator<< (short o)

6.71.3.5 ABA_OSTREAM& ABA_OSTREAM::operator<< (unsigned short o)

6.71.3.6 ABA_OSTREAM& ABA_OSTREAM::operator<< (int o)

6.71.3.7 ABA_OSTREAM& ABA_OSTREAM::operator<< (unsigned int o)

6.71.3.8 ABA_OSTREAM& ABA_OSTREAM::operator<< (long o)

6.71.3.9 ABA_OSTREAM& ABA_OSTREAM::operator<< (unsigned long o)

6.71.3.10 ABA_OSTREAM& ABA_OSTREAM::operator<< (float o)

6.71.3.11 ABA_OSTREAM& ABA_OSTREAM::operator<< (double o)

6.71.3.12 ABA_OSTREAM& ABA_OSTREAM::operator<< (const char * o)

6.71.3.13 ABA_OSTREAM& ABA_OSTREAM::operator<< (ABA_OSTREAM &(*)(ABA_OSTREAM &) pf) [inline]

Definition at line 105 of file ostream.h.

6.71.3.14 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_STRING & o)

A manipulator is a function having as argument a reference to an ABA_OSTREAM and returning an ABA_OSTREAM.

Manipulators are used that we can call, e.g., the function endl(o) by just writing its name omitting brackets and the function argument.

Returns:

A reference to the output stream.

Parameters:

m
An output stream manipulator.

6.71.3.15 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_TIMER & o)

6.71.3.16 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_HISTORY & o)

6.71.3.17 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_LPVARSTAT & o)

6.71.3.18 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_CSENSE & o)

6.71.3.19 ABA_OSTREAM& ABA_OSTREAM::operator<< (const ABA_LP & o)

6.71.3.20 void ABA_OSTREAM::off ()

Turns the output off.

6.71.3.21 void ABA_OSTREAM::on ()

Turns the output on.

6.71.3.22 void ABA_OSTREAM::logOn ()

Turns the output to the logfile on.

6.71.3.23 void ABA_OSTREAM::logOn (const char * logStreamName)

This version of logOn() turns the output to the logfile on and sets the log-file to logStreamName.

Parameters:

logStreamName
The name of the log-file.

6.71.3.24 void ABA_OSTREAM::logOff ()

Turns the output to the logfile off.

6.71.3.25 bool ABA_OSTREAM::isOn () const

Returns:

true If the output is turned on,

false otherwise.

6.71.3.26 bool ABA_OSTREAM::isLogOn () const

Returns:

true If the output to the logfile is turned on,

false otherwise.

6.71.3.27 ofstream* ABA_OSTREAM::log () const

Returns:

A pointer to the stream associated with the log-file.

6.71.3.28 void ABA_OSTREAM::setFormatFlag (fmtflags flag)

Can be used to set the format flags of the output stream and the log file similar to the function ios::set() of the iostream library.

For a documentation of all possible flags we refer to the documentation of the GNU / iostream Library.

Parameters:

flag
The flag being set.

6.71.4 Friends And Related Function Documentation

6.71.4.1 ABA_OSTREAM& flush (ABA_OSTREAM & o) [friend]

Flushes the output and the log stream buffers of the stream o. This function can be called via the manipulator o << flush;.

Returns:

A reference to the output stream.

Parameters:

o
An output stream.

6.71.4.2 ABA_OSTREAM& endl (ABA_OSTREAM & o) [friend]

Writes an end of line to the output and log-file of the stream o and flushes both stream buffers.

This function can be called via the manipulator o << endl;.

Returns:

A reference to the output stream.

Parameters:

o
An output stream.

6.71.4.3 ABA_OSTREAM& _setWidth (ABA_OSTREAM & o, int w) [friend]

Sets the width of the field for the next output operation on the log and the output stream.

In most cases the manipulator setWith is more convenient to use.

Returns:

A reference to the output stream.

Parameters:

o
An output stream.
w
The width of the field.

6.71.4.4 ABA_OSTREAM& _setPrecision (ABA_OSTREAM & o, int p) [friend]

Sets the precision for the output stream.

In most cases the manipulator setPrecision is more convenient to use.

Returns:

A reference to the output stream.

Parameters:

o
An output stream.
p
The precision.

6.71.5 Member Data Documentation

6.71.5.1 ostream& ABA_OSTREAM::out_ [private]

The “real” stream associated with our output stream (usually cout or cerr).

Definition at line 248 of file ostream.h.

6.71.5.2 bool ABA_OSTREAM::on_ [private]

If true, then output is written to the stream out_, otherwise it is suppressed.

Definition at line 253 of file ostream.h.

6.71.5.3 bool ABA_OSTREAM::logOn_ [private]

If true_, then output is also written to the log stream *log.

Definition at line 258 of file ostream.h.

6.71.5.4 ofstream*ABA_OSTREAM::log_ [private]

A pointer to a stream associated with the log file.

Definition at line 262 of file ostream.h.

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