LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Basic progress counter object, defining the interface... More...
#include <ProgressCounters.hpp>
Public Member Functions | |
void | attach (ObsT *) |
void | detach (ObsT *) |
virtual void | notify (void) |
Notify observers that an update should occur. | |
virtual void | finish (void) |
Notify observers that we've finished with our calculation. | |
virtual void | start (void) |
Notify observers that we're starting a calculation. | |
uint | count (void) const |
Number of iterations we've seen so far. | |
virtual double | elapsed (void) |
Total elapsed wall-time. | |
virtual uint | remaining (void) |
Remaining iterations (if applicable) | |
virtual double | timeRemaining (void) |
Remaining time (estimated, again if applicable) | |
virtual double | fractionComplete (void) |
Percent complete (if applicable) | |
Protected Attributes | |
uint | count_ |
Timer< WallTimer > | timer_ |
Observers | observers |
Basic progress counter object, defining the interface...
The idea here is that SimpleCounter and its children are "observable" objects (a la the Observer pattern). The SimpleCounter handles the basic time-keeping functions and forwards messages along to its observers when certain events happen, such as starting, stopping, and updating. Not all functions are implemented though. For example, the SimpleTimer doesn't have an estimate for the total number of updates it will receive, so the estimating functions will throw an error.
This class is not actually meant to be used by itself, but via the aggregator ProgressCounter class defined later...
|
virtual |
Percent complete (if applicable)
Reimplemented in loos::EstimatingCounter.
|
virtual |
Remaining iterations (if applicable)
Reimplemented in loos::EstimatingCounter.
|
virtual |
Remaining time (estimated, again if applicable)
Reimplemented in loos::EstimatingCounter.