Minsky
minsky::ProgressUpdater Class Reference

#include <progress.h>

Collaboration diagram for minsky::ProgressUpdater:
Collaboration graph

Public Member Functions

 ProgressUpdater (Progress &progress, const std::string &title, int numSteps)
 
void setProgress (double fraction)
 Sets the progress to a given fraction of this stack's allocation. More...
 
 ~ProgressUpdater ()
 

Private Attributes

Progress savedProgress
 
ProgressupdatedProgress
 

Detailed Description

Definition at line 58 of file progress.h.

Constructor & Destructor Documentation

◆ ProgressUpdater()

minsky::ProgressUpdater::ProgressUpdater ( Progress progress,
const std::string &  title,
int  numSteps 
)
inline

Definition at line 63 of file progress.h.

References minsky::Progress::delta, minsky::Progress::displayProgress(), minsky::Progress::title, updatedProgress, and minsky::Progress::updaterStack.

63  :
64  savedProgress(progress), updatedProgress(progress)
65  {
66  updatedProgress.title=title;
68  {
69  updatedProgress.delta/=numSteps;
70  }
71  else
72  {
74  updatedProgress.delta=100.0/numSteps;
75  }
77  }
Progress savedProgress
Definition: progress.h:60
void displayProgress(bool inDestruct=false)
Definition: minsky.cc:1794
double delta
Definition: progress.h:37
bool updaterStack
Definition: progress.h:39
std::string title
Definition: progress.h:42
Progress & updatedProgress
Definition: progress.h:61
Here is the call graph for this function:

◆ ~ProgressUpdater()

minsky::ProgressUpdater::~ProgressUpdater ( )
inline

Definition at line 83 of file progress.h.

References minsky::Progress::increment(), minsky::Progress::progress, savedProgress, updatedProgress, and minsky::Progress::updaterStack.

83  {
86  updatedProgress.progress=0; // reset progress counter once last ProgressUpdater exits
87  else
89  }
Progress savedProgress
Definition: progress.h:60
double progress
Definition: progress.h:38
void increment(bool inDestruct=false)
Definition: progress.h:48
bool updaterStack
Definition: progress.h:39
Progress & updatedProgress
Definition: progress.h:61
Here is the call graph for this function:

Member Function Documentation

◆ setProgress()

void minsky::ProgressUpdater::setProgress ( double  fraction)
inline

Sets the progress to a given fraction of this stack's allocation.

Definition at line 79 of file progress.h.

References minsky::Progress::delta, minsky::Progress::displayProgress(), minsky::Progress::progress, savedProgress, and updatedProgress.

Referenced by minsky::DataSpec::givenTFguessRemainder(), minsky::layoutGroup(), minsky::ParseCSV< P >::parse(), and minsky::reportFromCSVFileT().

79  {
82  }
Progress savedProgress
Definition: progress.h:60
double progress
Definition: progress.h:38
void displayProgress(bool inDestruct=false)
Definition: minsky.cc:1794
double delta
Definition: progress.h:37
Progress & updatedProgress
Definition: progress.h:61
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ savedProgress

Progress minsky::ProgressUpdater::savedProgress
private

Definition at line 60 of file progress.h.

Referenced by setProgress(), and ~ProgressUpdater().

◆ updatedProgress

Progress& minsky::ProgressUpdater::updatedProgress
private

Definition at line 61 of file progress.h.

Referenced by ProgressUpdater(), setProgress(), and ~ProgressUpdater().


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