Parses lines matching the PROGRESS:TYPE:PAYLOAD protocol and fires a callback for each match. More...
#include <progress_parser.hpp>
Public Types | |
| using | Callback = std::function<void(const ProgressEvent&)> |
Public Member Functions | |
| ProgressParser (Callback cb) | |
| void | feed_line (std::string_view line) |
| Feed a line of output. | |
Parses lines matching the PROGRESS:TYPE:PAYLOAD protocol and fires a callback for each match.
Lines that don't match are silently ignored.
Usage with ChildProcess:
| using pulp::platform::ProgressParser::Callback = std::function<void(const ProgressEvent&)> |
|
inlineexplicit |
|
inline |
Feed a line of output.
If it matches PROGRESS:TYPE:PAYLOAD, fires the callback. Otherwise does nothing.