#include <IsOs.h>
Inheritance diagram for Os_base::

NAME: Os_base - base class for generalized output, used by class Os
DESCRIPTION:
The class is handled by class "Os" (see class "Os" for the purpose of generalized output). Class "Os_base" serves as base class for various output sources such as ostream, ofstream, strings and xdr binary files. The comments in the description of class "Is_base" also apply to class "Os_base".
|
|
The constructor takes a format argument, indicating whether the input source has binary or ascii format. The default value is "ASCII". No further initialization is necessary. The comments in the description of class "Is_base" also apply to class "Os_base". |
|
|
|
|
|
closes output files (used when the file must be flushed and closed before the "Os" object has gone out of scope or has been deleted). In contrast to the standard output class "ostream" in C++, the "Os" class can set a fixed format for all real (or integer) numbers and reset the format to the original one when desired. Together with the "oform" and "aform" functions, this gives very flexible output formatting tools. Reimplemented in Os_ostream, Os_ofstream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
flushes the output buffer, that is, forces the output to be written immediately. Reimplemented in Os_ostream, Os_ofstream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
as "getRealFormat" but aimed at characters. |
|
|
returns the format type. The return value is an "enum" "Format_type". |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the width of the current format, for example, if we have called "setRealFormat" for a "12.4e" format, "getFormatWidth" returns 12. |
|
|
as "getRealFormat" but aimed at integers. |
|
|
as "getRealFormat" but aimed at "long int" variables. |
|
|
just that, in the example given above ("12.4e") it returns 4. |
|
|
returns the position in a random access file. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
get the output format for all real numbers. The string is on a format using well-known "printf" syntax. |
|
|
as "getRealFormat" but aimed at strings, or strictly speaking, "char[]" arrays. |
|
|
Reimplemented in Os_ostream, Os_ofstream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
See documentation of one of the overloaded functions. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
similar to "get", but writes the number/string/character. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
as "resetRealFormat" but aimed at characters. |
|
|
resets the format type to the value prior to last call to "setFormat". See similar function in class Is_base for more information. |
|
|
as "resetRealFormat" but aimed at integers. |
|
|
as "resetRealFormat" but aimed at "long int" variables. |
|
|
resets the real format to the value before last call to "setRealFormat". Very convenient if one wants to change the format inside a function but then reset the format to its original state. There are similar functions for the int, long, char and string formats as well. |
|
|
as "setRealFormat" but aimed at strings, or strictly speaking, "char[]" arrays. |
|
|
as "setRealFormat" but aimed at characters. |
|
|
sets the format type to "ASCII" or "BINARY". |
|
|
as "setRealFormat" but aimed at integers. |
|
|
as "setRealFormat" but aimed at "long int" variables. |
|
|
sets the position in a random access file. Reimplemented in Os_ostream, Os_MFCLog, Os_String, and Os_xdr. |
|
|
sets the output format for all real numbers. The argument takes a format string using the well-known "printf" syntax. Consult a C textbook for reference. Compared to format setting in "ostream", the "setRealFormat" function is much more convenient since it is not necessary to specify the format for every number being written. If a fixed format set by "setRealFormat" is not suitable, we recommend to use the functions "oform" or "aform" for flexible indication of the output format. These two functions work as "printf" but instead of writing to the standard output they return the formatted string as a "char[]" array ("oform") or as a "String" object ("aform"). Since "oform" uses a fixed-size internal character buffer and returns just a pointer to this buffer, repeated calls to "oform" may result in strange output errors. "aform" is much safer since it allocates a "String" every time it is invoked. |
|
|
as "setRealFormat" but aimed at strings, or strictly speaking, "char[]" arrays. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|