stdex Additional custom or not Standard C++ covered algorithms

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stdex::lazy_progress< T > Class Template Reference

Lazy progress indicator. More...

`#include <stdex/progress.hpp>`

Inheritance diagram for stdex::lazy_progress< T >:

## Public Member Functions
| lazy_progress (const std::chrono::nanoseconds &timeout=std::chrono::milliseconds(500))
| 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::system_clock::time_point | m_last
T | m_start
T | m_end
T | m_value

## Detailed Description

template<class T>
class stdex::lazy_progress< T >

Lazy progress indicator.

Use with expensive progress reporting to suppress progress indication for a period of time.

## Constructor & Destructor Documentation

## ◆ lazy_progress()

template<class T >

stdex::lazy_progress< T >::lazy_progress | ( | const std::chrono::nanoseconds & | timeout = std::chrono::milliseconds(500) | ) |
| inline

Constructs a lazy progress indicator.

Parameters

  [in] | timeout | Timeout to wait before forwarding progress

## Member Function Documentation

## ◆ set()

template<class T >

virtual void stdex::lazy_progress< T >::set | ( | T | value | ) |
| inline virtual

Set current progress.

Parameters

  [in] | value | Current value of the progress. Must be between start and end parameters provided in set_range() call.

Reimplemented from stdex::progress< T >.

## ◆ set_range()

template<class T >

virtual void stdex::lazy_progress< T >::set_range | ( | T | start,
|  | T | end )
| inline virtual

Set progress range extent.

Parameters

  [in] | start | Minimum value of the progress
  [in] | end | Maximum value of the progress

Reimplemented from stdex::progress< T >.

The documentation for this class was generated from the following file:

- include/stdex/progress.hpp