#include <IsOs.h>
Public Methods | |
| Os () | |
| Os (const char *s) | |
| Os (const String &s) | |
| Os (ostream &os) | |
| Os (ofstream &ofs) | |
| Os (const Os &os) | |
| Os (const String &filename, enum FileMode mode) | |
| Os (const String &filename, enum Format_type format, enum FileMode mode, bool xdr_format=true) | |
| ~Os () | |
| void | rebind (const char *s) |
| void | rebind (const String &s) |
| void | rebind (ostream &os) |
| void | rebind (ofstream &ofs) |
| void | rebind (const Os &os) |
| void | rebind (const String &filename, enum FileMode mode) |
| void | rebind (const String &filename, enum Format_type format, enum FileMode mode, bool xdr_format=true) |
| void | operator= (const Os &os) |
| void | init () |
| bool | ok () const |
| Os_base* | operator-> () |
| Os_base* | getPtr () |
| Os_base& | getRef () |
| void | flush () |
| bool | isString () |
| String | getString () |
Static Public Methods | |
| void | describeFile (const String &filename, const String &description) |
Friends | |
| Os& | operator<< (Os &os, double a) |
| Os& | operator<< (Os &os, float a) |
| Os& | operator<< (Os &os, int i) |
| Os& | operator<< (Os &os, long int i) |
| Os& | operator<< (Os &os, char c) |
| Os& | operator<< (Os &os, const char *s) |
| Os& | operator<< (Os &os, const String &s) |
| Os& | operator<< (Os &os, void *v) |
NAME: Os - generalized output class, covers streams, files, strings etc
DESCRIPTION:
See description of class "Is". Class "Os" has access to an "Os_base" hierarchy like class "Is" has a pointer to "Is_base". Most of the documentation of class "Is" is relevant for class "Os". The design, functionality and names of functions are as similar as possible. Hence, the documentation here of class "Os" is very brief.
|
|
The constructors take ordinary output sources as arguments and enable automatic type conversion. Output source arguments may be "ostream", "ofstream", "char*", "String" or C xdr-binary files. Additional initialization may be a call to the member function "Is_base setFormat" for setting the format to "BINARY" or "ASCII" mode. The default is "ASCII" mode. One can also initialize the output format for numbers by calling the functions "setRealFormat" and "setIntFormat". These functions can be called whenever it is desired. Note, this is not in effect in modern C++ compilers: The static member Os_base protection can be used to set a different file protection, the default is 0664 in contrast to the ofstream having 0644 as default. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
makes a description of a file on the file "casename.files". Every time one opens a 'new' file (not append mode!) one is encouraged to call "Os describeFile" and give a short description of the file. After a Diffpack program has terminated there may be a lot of files and the user can then examine the "casename.files" file if it is unclear what a file is. |
|
|
flushes the output buffer, that is, forces the output to be written immediately. |
|
|
returns a pointer to "Os_base". This function and "getRef" are usually used when casting from an "Os" to an "Os_base" subclass in order to use e.g. "iostream" or "String" functions directly. |
|
|
returns a reference to "Os_base". This function and "getRef" are usually used when casting from an "Os" to an "Os_base" subclass in order to use e.g. "iostream" or "String" functions directly. |
|
|
if the object is a "String" (see function "isString"), this function will return the "String" allowing you to use normal "String" functionality. |
|
|
initializes the "Os" object |
|
|
check if the object is a string. (If the object is a string, increased functionality is available.) |
|
|
determines if the "Os" object is properly initialized, that is, if it has access to an opened I/O source and is ready for reading data. |
|
|
"Os_base". See class "Os_base" for the member function documentation of the functionality that can be accessed through this operator. (If the pointer to "Os_base" is not properly initialized, an error message is issued.) |
|
|
|
|
|
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. |
|
|
function for attaching or changing output sources such as "ostream", "ofstream", "char*" or "String". See the constructors for more information. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|