|
LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
The progress counter front-end. More...
#include <ProgressCounters.hpp>


Public Member Functions | |
| ProgressCounter (const Trigger &t) | |
| ProgressCounter (const Trigger &t, const Counter &c) | |
| void | setTrigger (const Trigger &t) |
| Change the trigger. | |
| void | update (void) |
Public Member Functions inherited from loos::SimpleCounter | |
| 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) | |
Additional Inherited Members | |
Protected Attributes inherited from loos::SimpleCounter | |
| uint | count_ |
| Timer< WallTimer > | timer_ |
| Observers | observers |
The progress counter front-end.
This class combines a counter with a trigger. You can pick whether or not you use a simple counter or an estimating counter, for example, and then combine that with a criterion for firing off a message to any observers that they need to update their display/output. The trigger is just a functor that returns a true value if the update notification should be sent, or a false if not.
|
inline |
Update the number of iterations and decide whether or not to notify based on the trigger policy