|
libcrn
3.9.5
A document image processing library
|
Base class for a progress display. More...
#include <CRNProgress.h>
Inheritance diagram for crn::Progress:
Collaboration diagram for crn::Progress:Public Types | |
| enum | Type { Type::PERCENT = 0, Type::ABSOLUTE = 1 } |
Public Member Functions | |
| Progress (const String &nam, size_t maxcount=100) | |
| Constructor. More... | |
| Progress (const Progress &)=delete | |
| Progress (Progress &&)=default | |
| Progress & | operator= (const Progress &)=delete |
| Progress & | operator= (Progress &&)=default |
| virtual | ~Progress () |
| Destructor. More... | |
| void | Advance () |
| Progresses of one step. More... | |
| void | SetMaxCount (size_t maxcount, bool reset=true) |
| Sets the total number of steps. More... | |
| void | Reset () |
| Resets the progress to 0. More... | |
| void | SetType (Type typ) noexcept |
| Sets the type of progress bar. More... | |
| void | SetName (const crn::String &nam) |
Protected Member Functions | |
| virtual void | display (const String &msg)=0 |
| Displays the progress. More... | |
Protected Attributes | |
| String | name |
| size_t | current |
| size_t | end |
| String | disp |
| Type | type |
Base class for a progress display.
Progress display base class
Definition at line 39 of file CRNProgress.h.
|
strong |
| Enumerator | |
|---|---|
| PERCENT | |
| ABSOLUTE | |
Definition at line 42 of file CRNProgress.h.
|
inline |
Constructor.
Definition at line 44 of file CRNProgress.h.
|
delete |
|
default |
|
virtual |
| void Progress::Advance | ( | ) |
|
protectedpure virtual |
Displays the progress.
Implemented in crn::ConsoleProgress, and GtkCRN::Progress.
| void Progress::Reset | ( | ) |
Resets the progress to 0.
Definition at line 53 of file CRNProgress.cpp.
|
inline |
Sets the total number of steps.
Definition at line 56 of file CRNProgress.h.
|
inline |
Definition at line 63 of file CRNProgress.h.
|
inlinenoexcept |
Sets the type of progress bar.
Definition at line 61 of file CRNProgress.h.
|
protected |
The current step
Definition at line 70 of file CRNProgress.h.
|
protected |
The text displayed
Definition at line 72 of file CRNProgress.h.
|
protected |
The last step
Definition at line 71 of file CRNProgress.h.
|
protected |
Definition at line 69 of file CRNProgress.h.
|
protected |
The type of progress bar (Progress::PERCENT or Progress::ABSOLUTE
Definition at line 73 of file CRNProgress.h.
1.8.6