Inkscape
Vector Graphics Editor
|
An interface for tasks to report progress and check for cancellation. More...
#include <progress.h>
Public Member Functions | |
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(). | |
Protected Member Functions | |
~Progress ()=default | |
virtual bool | _keepgoing () const =0 |
virtual bool | _report (T const &... progress)=0 |
An interface for tasks to report progress and check for cancellation.
Not supported:
Definition at line 22 of file progress.h.
|
protecteddefault |
|
protectedpure virtual |
Implemented in Inkscape::Async::BackgroundProgress< T >, Inkscape::Async::SubProgress< T, S >, Inkscape::Async::ProgressStepThrottler< T, S >, Inkscape::Async::ProgressTimeThrottler< T >, and Inkscape::Async::ProgressAlways< T >.
Referenced by Inkscape::Async::Progress< T >::keepgoing(), Inkscape::Async::Progress< T >::operator bool(), and Inkscape::Async::Progress< T >::throw_if_cancelled().
|
protectedpure virtual |
Implemented in Inkscape::Async::BackgroundProgress< T >, and Inkscape::Async::ProgressTimeThrottler< T >.
Referenced by Inkscape::Async::Progress< T >::report(), and Inkscape::Async::Progress< T >::report_or_throw().
|
inline |
Return whether not cancelled.
Definition at line 32 of file progress.h.
References Inkscape::Async::Progress< T >::_keepgoing().
Referenced by Inkscape::Async::SubProgress< T, S >::_keepgoing(), Inkscape::Async::ProgressStepThrottler< T, S >::_keepgoing(), Inkscape::Async::ProgressTimeThrottler< T >::_keepgoing(), Inkscape::Async::ProgressTimeThrottler< T >::_report(), and Inkscape::Async::ProgressStepThrottler< T, S >::_report().
|
inline |
Convenience function - same as check().
Definition at line 38 of file progress.h.
References Inkscape::Async::Progress< T >::_keepgoing().
|
inline |
Report a progress value, returning false if cancelled.
Definition at line 26 of file progress.h.
References Inkscape::Async::Progress< T >::_report().
Referenced by Inkscape::Async::ProgressTimeThrottler< T >::_report(), Inkscape::Async::SubProgress< T, S >::_report(), and Inkscape::Async::ProgressStepThrottler< T, S >::_report().
|
inline |
Report a progress value, throwing CancelledException if cancelled.
Definition at line 29 of file progress.h.
References Inkscape::Async::Progress< T >::_report().
Referenced by Inkscape::Trace::Siox::extractForeground(), Inkscape::Trace::Depixelize::DepixelizeTracingEngine::trace(), and Inkscape::Trace::Potrace::PotraceTracingEngine::traceSingle().
|
inline |
Throw CancelledException if cancelled.
Definition at line 35 of file progress.h.
References Inkscape::Async::Progress< T >::_keepgoing().
Referenced by Inkscape::Trace::Potrace::PotraceTracingEngine::grayMapToPath(), and Inkscape::Trace::Potrace::PotraceTracingEngine::writePaths().