Inkscape
Vector Graphics Editor
|
A Progress object that throttles reports to a given time interval. More...
#include <progress.h>
Public Types | |
using | duration = clock::duration |
Public Member Functions | |
ProgressTimeThrottler (Progress< T... > &parent, duration interval) | |
![]() | |
bool | report (T const &... progress) |
Report a progress value, returning false if cancelled. | |
void | report_or_throw (T const &... progress) |
Report a progress value, throwing CancelledException if cancelled. | |
bool | keepgoing () const |
Return whether not cancelled. | |
void | throw_if_cancelled () const |
Throw CancelledException if cancelled. | |
operator bool () const | |
Convenience function - same as check(). | |
Private Types | |
using | clock = std::chrono::steady_clock |
using | time_point = clock::time_point |
Private Member Functions | |
bool | _keepgoing () const override |
bool | _report (T const &... progress) override |
Private Attributes | |
Progress< T... > * | parent |
duration | interval |
time_point | last = clock::now() |
Additional Inherited Members | |
![]() | |
~Progress ()=default | |
A Progress object that throttles reports to a given time interval.
Definition at line 109 of file progress.h.
|
private |
Definition at line 112 of file progress.h.
using Inkscape::Async::ProgressTimeThrottler< T >::duration = clock::duration |
Definition at line 116 of file progress.h.
|
private |
Definition at line 113 of file progress.h.
|
inline |
Definition at line 118 of file progress.h.
|
inlineoverrideprivatevirtual |
Implements Inkscape::Async::Progress< T... >.
Definition at line 126 of file progress.h.
References Inkscape::Async::Progress< T >::keepgoing(), and Inkscape::Async::ProgressTimeThrottler< T >::parent.
|
inlineoverrideprivatevirtual |
Implements Inkscape::Async::Progress< T... >.
Definition at line 128 of file progress.h.
References Inkscape::Async::ProgressTimeThrottler< T >::interval, Inkscape::Async::Progress< T >::keepgoing(), Inkscape::Async::ProgressTimeThrottler< T >::last, Inkscape::Async::ProgressTimeThrottler< T >::parent, and Inkscape::Async::Progress< T >::report().
|
private |
Definition at line 123 of file progress.h.
Referenced by Inkscape::Async::ProgressTimeThrottler< T >::_report().
|
private |
Definition at line 124 of file progress.h.
Referenced by Inkscape::Async::ProgressTimeThrottler< T >::_report().
|
private |
Definition at line 122 of file progress.h.
Referenced by Inkscape::Async::ProgressTimeThrottler< T >::_keepgoing(), and Inkscape::Async::ProgressTimeThrottler< T >::_report().