#include <rtstreams.h>
Inheritance diagram for lrt::FilterInputStream:

Public Methods | |
| FilterInputStream (InputStream *in) | |
Constructs a new FilterInputStream, which gets its data from the underlying stream in. | |
| virtual bool | markSupported () |
| Returns true only if the underlying input stream supports marking. | |
| virtual void | mark () |
| Marks the current position in the stream for later restoring it. More... | |
| virtual void | reset () |
| Restores the previously marked position in the stream. More... | |
| virtual int | read () |
| Reads a byte from the underlying input stream. | |
| virtual int | read (Array< char > &b, int off, int len) |
| Fills the array b with bytes from the underlying input stream. | |
| virtual bool | fail () |
| Returns true if there was some system failure for this stream (such as, it couldn't be opened). | |
| virtual InputStream * | detach () |
| Returns the underlying input stream from this filter stream and detaches it so that it won't be deleted, and can be used further after this filter stream has been destroyed. | |
| virtual bool | eos () |
| Checks if the underlying stream's end has been reached. More... | |
| virtual void | close () |
| Closes the underlying input stream. | |
| virtual | ~FilterInputStream () |
| Destroys this FilterInputStream and the underlying input stream. | |
Protected Attributes | |
| InputStream * | in |
| The underlying input stream, which serves as data source for this stream. | |
| bool | _detach |
| Is the underlying input stream detached? | |
This class has no practical application, but it's a good starting point for clever streams.
|
|
Checks if the underlying stream's end has been reached.
Implements lrt::InputStream. Reimplemented in lrt::ParseInputStream. |
|
|
Marks the current position in the stream for later restoring it. This will only work if the underlying input stream supports marking. Reimplemented from lrt::InputStream. Reimplemented in lrt::ParseInputStream. |
|
|
Restores the previously marked position in the stream. This will only work if the underlying input stream supports marking. Reimplemented from lrt::InputStream. Reimplemented in lrt::ParseInputStream. |