![]() |
Zen
A cross-platform functional programming language
|
Abstract stream type. More...
#include <zbl.hpp>
Public Member Functions | |
| stream () | |
| Default Constructor. | |
| stream (const stream &src) | |
| Copy constructor. | |
| stream (const z::string &txt) | |
| String Constructor. | |
| stream (FILE *file, QIODevice::OpenModeFlag flags) | |
| File Constructor. | |
| stream (file &f) | |
| File Constructor. | |
| QTextStream & | get () |
| Returns the stored value. | |
| int | pos () |
| Return current position in stream. | |
| bool | end () |
| Check if stream is at end. | |
| void | seek (const int &pos) |
| Seek to specified position in stream, if possible. | |
| void | flush () |
| Flush the stream. | |
| void | setDevice (z::file &file) |
| Set stream device. | |
| const QString & | getString () const |
| If string stream, return the underlying string. | |
| int | getChar () |
| Get a char from the stream. | |
Private Attributes | |
| QTextStream | _val |
| The value. | |
Abstract stream type.
| stream | ( | FILE * | file, |
| QIODevice::OpenModeFlag | flags | ||
| ) | [inline, explicit] |
File Constructor.
| file | The file |
| flags | Open mode |
| bool end | ( | ) | [inline] |
Check if stream is at end.
| QTextStream& get | ( | ) | [inline] |
Returns the stored value.
| int getChar | ( | ) | [inline] |
Get a char from the stream.
| const QString& getString | ( | ) | const [inline] |
If string stream, return the underlying string.
| int pos | ( | ) | [inline] |
Return current position in stream.
| void seek | ( | const int & | pos | ) | [inline] |
Seek to specified position in stream, if possible.
| pos | The position to seek to |
| void setDevice | ( | z::file & | file | ) | [inline] |
Set stream device.
| file | The device |