LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
loos::SimpleCounter Class Reference

Basic progress counter object, defining the interface... More...

#include <ProgressCounters.hpp>

Inheritance diagram for loos::SimpleCounter:
Inheritance graph
[legend]
Collaboration diagram for loos::SimpleCounter:
Collaboration graph
[legend]

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< WallTimertimer_
 
Observers observers
 

Detailed Description

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...

Member Function Documentation

◆ fractionComplete()

double loos::SimpleCounter::fractionComplete ( void )
virtual

Percent complete (if applicable)

Reimplemented in loos::EstimatingCounter.

◆ remaining()

uint loos::SimpleCounter::remaining ( void )
virtual

Remaining iterations (if applicable)

Reimplemented in loos::EstimatingCounter.

◆ timeRemaining()

double loos::SimpleCounter::timeRemaining ( void )
virtual

Remaining time (estimated, again if applicable)

Reimplemented in loos::EstimatingCounter.


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