gatb.core-API-0.0.0
|
Progress information display feature. More...
#include <Progress.hpp>
Public Member Functions | |
Progress (u_int64_t ntasks, const char *msg, std::ostream &os=std::cerr) | |
virtual | ~Progress () |
void | init () |
void | finish () |
void | inc (u_int64_t ntasks_done) |
void | set (u_int64_t ntasks_done) |
void | reset (u_int64_t ntasks) |
void | setMessage (const std::string &msg) |
Public Member Functions inherited from IteratorListener | |
virtual | ~IteratorListener () |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Additional Inherited Members | |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Progress information display feature.
This class is used to display some progression information, for instance during the iteration of an iterator.
It provides 3 methods that are supposed to be called by the progressing job:
It can be used as this by the SubjectIterator class that encapsulates an iterator and calls some functor for notifying progress information.
This implementation merely dumps '-' characters as progression goes on.
Progress | ( | u_int64_t | ntasks, |
const char * | msg, | ||
std::ostream & | os = std::cerr |
||
) |
Constructor.
[in] | ntasks | : nb of items to be processed |
[in] | msg | : message to be displayed |
[in] | os | : output stream where progress information is to be displayed |
|
inlinevirtual |
Destructor.
|
virtual |
Finish the progress information.
Reimplemented from IteratorListener.
|
virtual |
Increase the number of currently done tasks.
[in] | ntasks_done | : amount of job done before previous call. |
Reimplemented from IteratorListener.
|
virtual |
|
virtual |
We reinitialize the progress object.
Reimplemented from IteratorListener.
|
virtual |
Set the current number of tasks done.
[in] | ntasks_done | : sets the current number of job done. |
Reimplemented from IteratorListener.
|
virtual |
Associate a message to the listener.
[in] | msg | : message to be set. |
Reimplemented from IteratorListener.