QcStdinReader Class
Reads standard input line by line on a background thread and delivers the lines to the owner's thread. More...
| Header: | #include <headless/QcStdinReader.h> |
| Inherits: | QObject |
Public Functions
| QcStdinReader(const QcStdinReader &) | |
| QcStdinReader(QcStdinReader &&) | |
| void | start() |
| QcStdinReader & | operator=(QcStdinReader &&) |
| QcStdinReader & | operator=(const QcStdinReader &) |
Signals
| void | endOfInput() |
| void | lineReceived(const QByteArray &line) |
Detailed Description
Blocking reads keep the event loop free and work the same on every platform (a socket notifier on stdin does not work on Windows).
Member Function Documentation
[delete] QcStdinReader::QcStdinReader(const QcStdinReader &)
Copy-constructs an instance of QcStdinReader. This function is deleted.
[delete] QcStdinReader::QcStdinReader(QcStdinReader &&)
Move-constructs an instance of QcStdinReader. This function is deleted.
[signal] void QcStdinReader::endOfInput()
Standard input has ended; after the last lineReceived().
[signal] void QcStdinReader::lineReceived(const QByteArray &line)
A line of standard input arrived, with its line end (the last line may have none).
void QcStdinReader::start()
Starts the reading thread; it is not joined and ends with the process.
[delete] QcStdinReader &QcStdinReader::operator=(QcStdinReader &&)
Move-assigns other to this QcStdinReader instance. This function is deleted.
[delete] QcStdinReader &QcStdinReader::operator=(const QcStdinReader &)
Copy-assigns other to this QcStdinReader instance. This function is deleted.