#include <tpie/progress_indicator_arrow.h>
Inherits tpie::progress_indicator_terminal.
Public Member Functions | |
| progress_indicator_arrow (const char *title, stream_size_type range, std::ostream &os=std::cout) | |
| Initializes the indicator. More... | |
| void | set_indicator_length (int indicatorLength) |
| Set the maximum length of the indicator. More... | |
| virtual void | reset () |
| Reset the current state of the indicator and its current length. More... | |
| void | push_breadcrumb (const char *crumb, description_importance) |
| void | pop_breadcrumb () |
| virtual void | refresh () |
| Display the indicator. More... | |
| void | done () |
| Advance the indicator to the end. More... | |
| void | set_title (const std::string &title) |
| Set the title of a new task to be monitored. More... | |
| void | step (stream_size_type step=1) |
| Record an increment to the indicator and advance the indicator. More... | |
| void | raw_step (stream_size_type step) |
| Internal method used in fractional progress. More... | |
| virtual void | init (stream_size_type range=0) |
| Initialize progress indicator. More... | |
| virtual void | set_range (stream_size_type range) |
| Set the upper bound of the counting range. More... | |
| stream_size_type | get_current () |
| Get the current value of the step counter. More... | |
| stream_size_type | get_range () |
| Get the maximum value of the current range. More... | |
| execution_time_predictor * | get_time_predictor () |
| void | set_time_predictor (execution_time_predictor *p) |
| std::string | estimated_remaining_time () |
Protected Member Functions | |
| void | display_percentage () |
| Compute and print the percentage or step count. More... | |
Protected Attributes | |
| memory_size_type | m_indicatorLength |
| The maximal length of the indicator. More... | |
| std::string | m_status |
| The previously displayed status line. More... | |
| std::ostream & | m_os |
| ostream on which to display the progress indicator More... | |
| std::deque< std::string > | m_crumbs |
| std::string | m_title |
| A string holding the description of the title. More... | |
| stream_size_type | m_range |
| The upper bound of the counting range. More... | |
| stream_size_type | m_current |
| The current progress count [m_minRange...m_maxRange]. More... | |
A class that indicates the progress by expanding an arrow.
Definition at line 37 of file progress_indicator_arrow.h.
|
inline |
Initializes the indicator.
| title | The title of the progress indicator. |
| range | The number of times we call step |
Definition at line 48 of file progress_indicator_arrow.h.
References m_indicatorLength.
|
inlineprotectedinherited |
Compute and print the percentage or step count.
Definition at line 139 of file progress_indicator_terminal.h.
References tpie::progress_indicator_base::m_current, and tpie::progress_indicator_base::m_range.
Referenced by tpie::progress_indicator_terminal::refresh().
|
inlinevirtualinherited |
Advance the indicator to the end.
Reimplemented from tpie::progress_indicator_base.
Definition at line 95 of file progress_indicator_terminal.h.
References tpie::progress_indicator_base::m_current, tpie::progress_indicator_base::m_range, and tpie::progress_indicator_terminal::refresh().
|
inlineinherited |
Get the current value of the step counter.
Definition at line 152 of file progress_indicator_base.h.
|
inlineinherited |
Get the maximum value of the current range.
Definition at line 157 of file progress_indicator_base.h.
|
inlinevirtualinherited |
Initialize progress indicator.
| range | The number of times step() is going to be called. |
Reimplemented in tpie::fractional_subindicator, tpie::progress_indicator_subindicator, and tpie::progress_indicator_null.
Definition at line 121 of file progress_indicator_base.h.
Referenced by tpie::merge_sorter< T, UseProgress, pred_t, store_t >::calc(), and tpie::parallel_sort().
|
inlineinherited |
Internal method used in fractional progress.
In a hierarchy of fractional progress subindicators, only the lowest level of indicators should determine how many steps should pass until the next call to refresh(). When this happens, the subindicator calls raw_step() on its parent indicator rather than step(), which will short-circuit the logic and call the virtual method refresh() directly. You should probably not use this method; use step() instead.
Definition at line 111 of file progress_indicator_base.h.
|
inlinevirtual |
Display the indicator.
Reimplemented from tpie::progress_indicator_terminal.
Definition at line 81 of file progress_indicator_arrow.h.
References tpie::progress_indicator_base::m_current, m_indicatorLength, tpie::progress_indicator_base::m_range, and tpie::progress_indicator_terminal::m_title.
|
inlinevirtual |
Reset the current state of the indicator and its current length.
Definition at line 66 of file progress_indicator_arrow.h.
References tpie::progress_indicator_base::m_current.
|
inline |
Set the maximum length of the indicator.
The length is enforced to be an integer in [2,60].
| indicatorLength | The maximum length of the indicator. |
Definition at line 59 of file progress_indicator_arrow.h.
References m_indicatorLength.
|
inlinevirtualinherited |
Set the upper bound of the counting range.
This method also implies a reset of the counter. In order to be able to set the uper bound independent of setting the lower bound, no range checking is done.
| range | The new upper bound. |
Reimplemented in tpie::progress_indicator_null.
Definition at line 140 of file progress_indicator_base.h.
|
inlineinherited |
Set the title of a new task to be monitored.
The terminal line will be newline'd, and the title will be followed by a newline as well.
| title | The title of the new task to be monitored. |
Definition at line 112 of file progress_indicator_terminal.h.
References tpie::progress_indicator_terminal::m_title.
|
inlineinherited |
Record an increment to the indicator and advance the indicator.
Definition at line 91 of file progress_indicator_base.h.
Referenced by tpie::merge_sorter< T, UseProgress, pred_t, store_t >::calc(), and tpie::ami::Internal_Sorter_Obj< T, Compare >::sort().
|
protectedinherited |
The current progress count [m_minRange...m_maxRange].
Definition at line 174 of file progress_indicator_base.h.
Referenced by tpie::progress_indicator_terminal::display_percentage(), tpie::progress_indicator_terminal::done(), refresh(), tpie::progress_indicator_spin::refresh(), and reset().
|
protected |
The maximal length of the indicator.
Definition at line 135 of file progress_indicator_arrow.h.
Referenced by progress_indicator_arrow(), refresh(), and set_indicator_length().
|
protected |
ostream on which to display the progress indicator
Definition at line 141 of file progress_indicator_arrow.h.
|
protectedinherited |
The upper bound of the counting range.
Definition at line 171 of file progress_indicator_base.h.
Referenced by tpie::progress_indicator_terminal::display_percentage(), tpie::progress_indicator_terminal::done(), and refresh().
|
protected |
The previously displayed status line.
Definition at line 138 of file progress_indicator_arrow.h.
|
protectedinherited |
A string holding the description of the title.
Definition at line 155 of file progress_indicator_terminal.h.
Referenced by refresh(), tpie::progress_indicator_terminal::refresh(), and tpie::progress_indicator_terminal::set_title().