Go to the documentation of this file.
24 #ifndef _TPIE_PROGRESS_INDICATOR_TERMINAL_H
25 #define _TPIE_PROGRESS_INDICATOR_TERMINAL_H
115 m_os << title << std::endl;
125 m_os <<
'\r' <<
m_title <<
' ';
167 #endif // _PROGRESS_INDICATOR_TERMINAL
The base class for indicating the progress of some task.
virtual ~progress_indicator_terminal()
The destructor.
progress_indicator_terminal(const char *title, stream_size_type range, std::ostream &os=std::cout)
Initializes the indicator.
void display_percentage()
Compute and print the percentage or step count.
stream_size_type m_current
The current progress count [m_minRange...m_maxRange].
std::string m_title
A string holding the description of the title.
void set_title(const std::string &title)
Set the title of a new task to be monitored.
void done()
Advance the indicator to the end.
A class that indicates the progress by a simple counter that is printed to the terminal.
virtual void refresh()
Display the indicator.
stream_size_type m_range
The upper bound of the counting range.