Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ProgressReporter Class Reference

Base class for a Progress Reporter. More...

#include <ored/utilities/progressbar.hpp>

+ Collaboration diagram for ProgressReporter:

Public Member Functions

 ProgressReporter ()
 
void registerProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator)
 register a Progress Indicator More...
 
void unregisterProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator)
 unregister a Progress Indicator More...
 
void unregisterAllProgressIndicators ()
 unregister all progress indicators More...
 
void updateProgress (const unsigned long progress, const unsigned long total, const std::string &detail="")
 update progress More...
 
void resetProgress ()
 reset More...
 
const std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > & progressIndicators () const
 return progress indicators More...
 

Private Attributes

std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > indicators_
 

Detailed Description

Base class for a Progress Reporter.

Definition at line 52 of file progressbar.hpp.

Constructor & Destructor Documentation

◆ ProgressReporter()

Definition at line 54 of file progressbar.hpp.

54{}

Member Function Documentation

◆ registerProgressIndicator()

void registerProgressIndicator ( const QuantLib::ext::shared_ptr< ProgressIndicator > &  indicator)

register a Progress Indicator

Definition at line 27 of file progressbar.cpp.

27 {
28 indicators_.insert(indicator);
29}
std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > indicators_
Definition: progressbar.hpp:75

◆ unregisterProgressIndicator()

void unregisterProgressIndicator ( const QuantLib::ext::shared_ptr< ProgressIndicator > &  indicator)

unregister a Progress Indicator

Definition at line 31 of file progressbar.cpp.

31 {
32 indicators_.erase(indicator);
33}

◆ unregisterAllProgressIndicators()

void unregisterAllProgressIndicators ( )

unregister all progress indicators

Definition at line 35 of file progressbar.cpp.

35{ indicators_.clear(); }

◆ updateProgress()

void updateProgress ( const unsigned long  progress,
const unsigned long  total,
const std::string &  detail = "" 
)

update progress

Definition at line 37 of file progressbar.cpp.

37 {
38 for (const auto& i : indicators_)
39 i->updateProgress(progress, total, detail);
40}

◆ resetProgress()

void resetProgress ( )

reset

Definition at line 42 of file progressbar.cpp.

42 {
43 for (const auto& i : indicators_)
44 i->reset();
45}

◆ progressIndicators()

const std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > & progressIndicators ( ) const

return progress indicators

Definition at line 72 of file progressbar.hpp.

72{ return indicators_; }

Member Data Documentation

◆ indicators_

std::set<QuantLib::ext::shared_ptr<ProgressIndicator> > indicators_
private

Definition at line 75 of file progressbar.hpp.