#include <nprogressmanager.h>
Inheritance diagram for regina::NProgressManager:
Public Member Functions | |
NProgressManager () | |
Creates a new progress manager with no NProgress to manage. | |
~NProgressManager () | |
Destroys this manager as well as the corresponding NProgress. | |
bool | isStarted () const |
Determines if an NProgress has been assigned to this manager yet. | |
bool | isFinished () const |
Determines if the NProgress that we are managing has finished. | |
const NProgress * | getProgress () const |
Returns the NProgress that this manager is managing. | |
void | setProgress (NProgress *newProgress) |
Assigns the given NProgress to this manager to manage. | |
void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. |
The life cycle of an NProgressManager and the corresponding NProgress is as follows. Note that the reading thread is the interface thread that is querying the state of progress, and the writing thread is the thread in which the operation is actually being performed.
true
;true
, displays the final progress message to the user and destroys the NProgressManager.true
the reading thread might destroy the NProgressManager and thus the NProgress at any time. The writing thread cannot destroy these objects because it has no guarantee that the reading thread is not still reading progress reports from them.
regina::NProgressManager::NProgressManager | ( | ) | [inline] |
Creates a new progress manager with no NProgress to manage.
regina::NProgressManager::~NProgressManager | ( | ) | [inline] |
Destroys this manager as well as the corresponding NProgress.
true
.
The NProgress that we are managing has finished, that is, isFinished() returns true
.
bool regina::NProgressManager::isStarted | ( | ) | const [inline] |
bool regina::NProgressManager::isFinished | ( | ) | const [inline] |
Determines if the NProgress that we are managing has finished.
That is, this routine determines if NProgress::isFinished() returns true
.
Once this routine returns true
, it will always return true
; thus there will be no need to call it again.
true
.true
if and only if the NProgress that we are managing has finished. const NProgress * regina::NProgressManager::getProgress | ( | ) | const [inline] |
Returns the NProgress that this manager is managing.
If isStarted() returns true
, you are guaranteed that this routine will not return zero.
void regina::NProgressManager::setProgress | ( | NProgress * | newProgress | ) | [inline] |
Assigns the given NProgress to this manager to manage.
newProgress | the NProgress that this manager will manage. |
void regina::NProgressManager::writeTextShort | ( | std::ostream & | out | ) | const [inline, virtual] |
Writes this object in short text format to the given output stream.
The output should fit on a single line and no newline should be written.
out | the output stream to which to write. |
Implements regina::ShareableObject.