LOOS  v2.3.2
loos::ProgressCounter< Trigger, Counter > Class Template Reference

The progress counter front-end. More...

#include <ProgressCounters.hpp>

Inheritance diagram for loos::ProgressCounter< Trigger, Counter >:
Collaboration diagram for loos::ProgressCounter< Trigger, Counter >:

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)
 

Detailed Description

template<class Trigger = TriggerAlways, class Counter = SimpleCounter>
class loos::ProgressCounter< Trigger, Counter >

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.

Definition at line 155 of file ProgressCounters.hpp.

Member Function Documentation

template<class Trigger = TriggerAlways, class Counter = SimpleCounter>
void loos::ProgressCounter< Trigger, Counter >::update ( void  )
inline

Update the number of iterations and decide whether or not to notify based on the trigger policy

Definition at line 165 of file ProgressCounters.hpp.


The documentation for this class was generated from the following file: