Structure to report the progress of a long operation or to cancel it.
More...
#include <Progress.hpp>
|
|
| Progress (std::ostream &os) |
| | Constructor.
|
| template<typename F> |
| void | log (F f) |
|
|
std::atomic< State > | state = State::Normal |
| | State of the long operation.
|
|
std::atomic< int > | done = 0 |
| | Number of steps already done.
|
|
std::atomic< int > | total = 0 |
| | Total number of steps.
|
Structure to report the progress of a long operation or to cancel it.
◆ State
Possible states of a long operation.
| Enumerator |
|---|
| Normal | The operation is ongoing or is fully completed.
|
| Canceled | The operation has been canceled externally.
|
| EarlyExit | The operation stopped after a partial result was found.
|
◆ log()
template<typename F>
| void Progress::log |
( |
F | f | ) |
|
|
inline |
Get exclusive access to the shared output stream and output progress information with the given function
The documentation for this class was generated from the following file: