![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
Public Member Functions | |
| Impl (std::string_view title, U32 nb_work, char progress_char='+', FU16 bar_length=0u) | |
| Impl (const Impl &reporter)=delete | |
| Impl (Impl &&reporter) noexcept | |
| ~Impl () | |
| Impl & | operator= (const Impl &reporter)=delete |
| Impl & | operator= (Impl &&reporter)=delete |
| void | Update (U32 nb_work=1u) |
| void | Done () |
Private Member Functions | |
| void | Initialize (std::string_view title, FU16 bar_length=0u) |
Private Attributes | |
| U32 | m_nb_work_total |
| U32 | m_nb_work_done |
| FU16 | m_nb_progress_total |
| FU16 | m_nb_progress_printed |
| char | m_progress_char |
| NotNull< std::FILE *> | m_fout |
| DynamicArray< char > | m_buffer |
| char * | m_current_pos |
| WallClockTimer | m_timer |
| std::mutex | m_mutex |
A class of progress reporters.
|
explicit |
Constructs a progress reporter.
| [in] | title | The title. |
| [in] | nb_work | The total number of work units. |
| [in] | progress_char | The character representing the progress. |
| [in] | bar_length | The length of the progress bar. If bar_length is equal to 0 the default length will be chosen. |
|
delete |
Constructs a progress reporter from the given progress reporter.
| [in] | reporter | A reference to the progress reporter to copy. |
|
noexcept |
Constructs a progress reporter by moving the given progress reporter.
| [in] | reporter | A reference to the progress reporter to move. |
|
default |
Destructs this progress reporter.
| void mage::ProgressReporter::Impl::Done | ( | ) |
Finishes this progress reporter.
|
private |
Initializes this progress reporter.
| [in] | title | The title. |
| [in] | bar_length | The length of the progress bar. If bar_length is equal to 0 the default length will be chosen. |
Copies the given progress reporter to this progress reporter.
| [in] | reporter | A reference to the progress reporter to copy. |
Copies the given progress reporter to this progress reporter.
| [in] | reporter | A reference to the progress reporter to move. |
| void mage::ProgressReporter::Impl::Update | ( | U32 | nb_work = 1u | ) |
Updates this progress reporter.
| [in] | nb_work | The number of work units that are done. |
|
private |
A pointer to the output buffer of this progress reporter.
|
private |
A pointer to the current character in the output buffer of this progress reporter.
|
private |
A pointer to the output file stream of this progress reporter.
|
private |
The mutex of this progress reporter.
|
private |
The total number of progress characters that are currently outputted by this progress reporter.
|
private |
The total number of progress characters that need to be outputted by this progress reporter.
|
private |
The number of work units that are currently done.
|
private |
The total number of work units that need to be done.
|
private |
The progress character of this progress reporter.
|
private |
The timer of this progress reporter.