MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Base class for all other classes able to inform calling processes about progress of a running operation. More...
#include <mdsProgress.h>
Classes | |
struct | CProgressInitializer |
Helper class used to call methods beginProgress() and endProgress() automatically. More... | |
Public Types | |
typedef mds::base::CFunctor < bool, int, int > | tProgressFunc |
Progress observer (= functor). | |
typedef CProgressInitializer | tProgressInitializer |
Helper class which can be used to call methods beginProgress() and endProgress() automatically. | |
Public Member Functions | |
void | beginProgress () |
This function must be called by the class realizing an operation before it starts. | |
CProgress () | |
Constructor. | |
CProgress (const CProgress &p) | |
Copy constructor. | |
void | deregisterProgressFunc () |
Sets the default empty observer. | |
void | endProgress () |
The function must be called by the class realizing an operation every time the operation finishes. | |
int | getProgressCount () const |
Returns current value of the internal progress value. | |
int | getProgressMax () const |
Returns the maximum allowed value of the internal progress counter. | |
bool | progress (int iIncrement=1) |
Calls the registered observer. | |
void | registerProgressFunc (const tProgressFunc &Func) |
Sets observer/functor called to inform a calling process about the current state of the running operation. | |
void | setProgressMax (int iValue) |
Sets the maximal counter value. | |
~CProgress () | |
Destructor. |
Base class for all other classes able to inform calling processes about progress of a running operation.
typedef mds::base::CFunctor<bool, int, int> mds::mod::CProgress::tProgressFunc |
Progress observer (= functor).
Helper class which can be used to call methods beginProgress() and endProgress() automatically.
Create static object of this type at the begining of a method that realizes an operation.
Constructor.
mds::mod::CProgress::CProgress | ( | const CProgress & | p | ) |
Copy constructor.
Destructor.
void mds::mod::CProgress::beginProgress | ( | ) |
This function must be called by the class realizing an operation before it starts.
Sets the default empty observer.
void mds::mod::CProgress::endProgress | ( | ) |
The function must be called by the class realizing an operation every time the operation finishes.
int mds::mod::CProgress::getProgressCount | ( | ) | const |
Returns current value of the internal progress value.
int mds::mod::CProgress::getProgressMax | ( | ) | const |
Returns the maximum allowed value of the internal progress counter.
bool mds::mod::CProgress::progress | ( | int | iIncrement = 1 | ) |
Calls the registered observer.
void mds::mod::CProgress::registerProgressFunc | ( | const tProgressFunc & | Func | ) |
Sets observer/functor called to inform a calling process about the current state of the running operation.
void mds::mod::CProgress::setProgressMax | ( | int | iValue | ) |
Sets the maximal counter value.