|
stdex
Additional custom or not Standard C++ covered algorithms
|
Lazy progress indicator base class. More...
#include <stdex/progress.hpp>
Public Member Functions | |
| lazy_progress (const std::chrono::nanoseconds &timeout=std::chrono::nanoseconds(500000)) | |
| Constructs a lazy progress indicator. | |
| virtual void | set_range (T start, T end) |
| Set progress range extent. | |
| virtual void | set (T value) |
| Set current progress. | |
Public Member Functions inherited from stdex::progress< T > | |
| virtual void | set_text (const char *msg) |
| Set progress indicator text. | |
| virtual void | show (bool show=true) |
| Show or hide progress. | |
| virtual bool | cancel () |
| Query whether user requested abort. | |
Protected Member Functions | |
| virtual void | do_set () |
| Called when progress reporting is due. Should override this method to implement actual progress refresh. | |
Protected Attributes | |
| std::chrono::nanoseconds | m_timeout |
| std::chrono::steady_clock::time_point | m_last |
| T | m_start |
| T | m_end |
| T | m_value |
Lazy progress indicator base class.
Use with expensive progress reporting to suppress progress indication for a period of time.
|
inline |
Constructs a lazy progress indicator.
| [in] | timeout | Timeout to wait before forwarding progress |
|
inlinevirtual |
Set current progress.
| [in] | value | Current value of the progress. Must be between start and end parameters provided in set_range() call. |
Reimplemented from stdex::progress< T >.
|
inlinevirtual |
Set progress range extent.
| [in] | start | Minimum value of the progress |
| [in] | end | Maximum value of the progress |
Reimplemented from stdex::progress< T >.