![]() |
The Simons
|
#include <FormatStream.h>
Inheritance diagram for FormatStream:
The FormatStream class is an intermediate class in the streams hierarchy and the superclass of all streams that perform data encoding or decoding. The descendants of FormatStream are Reader and Writer, which define the abstract protocols for reading and writing Object data. Different serial Object encodings are possible, with the default being XML 1.0 (ISO-8859-1), which is encoded by XMLWriter and decoded by XMLReader. This is the standard format for serialising and restoring Object data. Other anticipated data formats include CSV (comma separated value) format for tabular data, which is used by several spreadsheet and database programs; and GGI (computer gateway interface) format, which is the encoding in which web-browsers submit the contents of web forms. FormatStream forwards requests to open, close and inspect its state to an abstract FileStream, defined in descendant classes, which handles the actual input or output of formatted data.
Public Member Functions | |
FormatStream () | |
Construct a default FormatStream. | |
virtual | ~FormatStream () |
Release a FormatStream. | |
virtual Void | openOn (StringID) |
Open this FormatStream on a new path name. | |
virtual Void | open () |
Open this FormatStream. | |
virtual Void | close () |
Close this FormatStream. | |
virtual StringID | name () const |
Return the name of this FormatStream. | |
virtual Boolean | exists () const |
Test if this FormatStream exists. | |
virtual Boolean | empty () const |
Test if this FormatStream is empty. | |
virtual Boolean | ready () const |
Test if this FormatStream is ready. | |
virtual Boolean | failed () const |
Test if this FormatStream has failed. | |
virtual Boolean | source () const |
Test if this FormatStream is a source. | |
virtual Boolean | sink () const |
Test if this FormatStream is a sink. | |
Protected Member Functions | |
FormatStream (const FormatStream &) | |
Copy another FormatStream. | |
virtual FileStreamID | fileStream () const |
Return the wrapped FileStream. This method is abstract. |
|
Copy another FormatStream. Required by C++ to ensure that copying a FormatStream faithfully copies a Stream.
|
|
Construct a default FormatStream.
|
|
Release a FormatStream.
|
|
Close this FormatStream. Closes the wrapped FileStream, which disconnects from the filesystem. Reimplemented from Stream. |
|
Test if this FormatStream is empty. Tests whether the wrapped FileStream is empty.
Reimplemented from Stream. |
|
Test if this FormatStream exists. Tests whether the wrapped FileStream has an open connection to the underlying filesystem.
Reimplemented from Stream. |
|
Test if this FormatStream has failed. Tests whether the wrapped FileStream has failed.
Reimplemented from Stream. |
|
Return the wrapped FileStream. This method is abstract.
|
|
Return the name of this FormatStream. Return the name of the underlying FileStream.
Reimplemented from Stream. |
|
Open this FormatStream. Opens the wrapped FileStream on the current path name and connects to the filesystem. Reimplemented from Stream. |
|
Open this FormatStream on a new path name. Opens the wrapped FileStream on the the supplied path name and connects to the filesystem.
Reimplemented from Stream. Reimplemented in CGIReader. |
|
Test if this FormatStream is ready. Tests whether the wrapped FileStream is ready.
Reimplemented from Stream. |
|
Test if this FormatStream is a sink. Tests whether the wrapped FileStream is an Output stream.
Reimplemented from Stream. |
|
Test if this FormatStream is a source. Tests whether the wrapped FileStream is an Input stream.
Reimplemented from Stream. |