#include <ostream.h>
Inheritance diagram for ABA_OSTREAM:
Public Member Functions | |
ABA_OSTREAM (ostream &out, const char *logStreamName=0) | |
~ABA_OSTREAM () | |
The destructor. | |
ABA_OSTREAM & | operator<< (char o) |
Reimplementation for all fundamental types, for const char *, and for some other classes listed below. | |
ABA_OSTREAM & | operator<< (unsigned char o) |
ABA_OSTREAM & | operator<< (signed char o) |
ABA_OSTREAM & | operator<< (short o) |
ABA_OSTREAM & | operator<< (unsigned short o) |
ABA_OSTREAM & | operator<< (int o) |
ABA_OSTREAM & | operator<< (unsigned int o) |
ABA_OSTREAM & | operator<< (long o) |
ABA_OSTREAM & | operator<< (unsigned long o) |
ABA_OSTREAM & | operator<< (float o) |
ABA_OSTREAM & | operator<< (double o) |
ABA_OSTREAM & | operator<< (const char *o) |
ABA_OSTREAM & | operator<< (ABA_OSTREAM &(*pf)(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. | |
ABA_OSTREAM & | operator<< (const ABA_TIMER &o) |
ABA_OSTREAM & | operator<< (const ABA_HISTORY &o) |
ABA_OSTREAM & | operator<< (const ABA_LPVARSTAT &o) |
ABA_OSTREAM & | operator<< (const ABA_CSENSE &o) |
ABA_OSTREAM & | operator<< (const ABA_LP &o) |
void | off () |
void | on () |
void | logOn () |
void | logOn (const char *logStreamName) |
This version of logOn() turns the output to the logfile on and sets the log-file to logStreamName. | |
void | logOff () |
bool | isOn () const |
bool | isLogOn () const |
ofstream * | log () const |
void | 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. | |
Private Attributes | |
ostream & | out_ |
The ``real'' stream associated with our output stream (usually cout or cerr). | |
bool | on_ |
If true, then output is written to the stream out_, otherwise it is suppressed. | |
bool | logOn_ |
If true_, then output is also written to the log stream *log. | |
ofstream * | log_ |
Friends | |
ABA_OSTREAM & | flush (ABA_OSTREAM &o) |
Flushes the output and the log stream buffers of the stream o. This function can be called via the manipulator o << flush;. | |
ABA_OSTREAM & | endl (ABA_OSTREAM &o) |
ABA_OSTREAM & | _setWidth (ABA_OSTREAM &o, int w) |
ABA_OSTREAM & | _setPrecision (ABA_OSTREAM &o, int p) |
Definition at line 64 of file ostream.h.
ABA_OSTREAM::ABA_OSTREAM | ( | ostream & | out, | |
const char * | logStreamName = 0 | |||
) |
The constructor turns the output on and associates it with a ``real'' stream.
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. |
ABA_OSTREAM::~ABA_OSTREAM | ( | ) |
The destructor.
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.
o | The item being output. |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | unsigned char | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | signed char | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | short | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | unsigned short | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | int | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | unsigned int | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | long | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | unsigned long | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | float | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | double | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const char * | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | ABA_OSTREAM &(*)(ABA_OSTREAM &) | pf | ) | [inline] |
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.
m | An output stream manipulator. |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const ABA_TIMER & | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const ABA_HISTORY & | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const ABA_LPVARSTAT & | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const ABA_CSENSE & | o | ) |
ABA_OSTREAM& ABA_OSTREAM::operator<< | ( | const ABA_LP & | o | ) |
void ABA_OSTREAM::off | ( | ) |
Turns the output off.
void ABA_OSTREAM::on | ( | ) |
Turns the output on.
void ABA_OSTREAM::logOn | ( | ) |
Turns the output to the logfile on.
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.
logStreamName | The name of the log-file. |
void ABA_OSTREAM::logOff | ( | ) |
Turns the output to the logfile off.
bool ABA_OSTREAM::isOn | ( | ) | const |
false otherwise.
bool ABA_OSTREAM::isLogOn | ( | ) | const |
false otherwise.
ofstream* ABA_OSTREAM::log | ( | ) | const |
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.
flag | The flag being set. |
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;.
o | An output stream. |
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;.
o | An output stream. |
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.
o | An output stream. | |
w | The width of the field. |
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.
o | An output stream. | |
p | The precision. |
ostream& ABA_OSTREAM::out_ [private] |
bool ABA_OSTREAM::on_ [private] |
bool ABA_OSTREAM::logOn_ [private] |
ofstream* ABA_OSTREAM::log_ [private] |