SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
ScopedProgressReporter Class Reference

Holds a progress reporter for the duration of one analysis. More...

#include <analysishost.h>

Collaboration diagram for ScopedProgressReporter:
Collaboration graph

Public Member Functions

 ScopedProgressReporter (AnalysisHost *host, int number_of_panels=1, bool extra_label_and_progressbar=false)
 
 ~ScopedProgressReporter ()
 
 ScopedProgressReporter (const ScopedProgressReporter &)=delete
 
ScopedProgressReporter & operator= (const ScopedProgressReporter &)=delete
 
ProgressReporter * Get () const
 
ProgressReporter * operator-> () const
 
 operator ProgressReporter * () const
 

Private Attributes

AnalysisHost * host_
 
ProgressReporter * reporter_
 

Detailed Description

Holds a progress reporter for the duration of one analysis.

Obtains a reporter from the host on construction and returns it on destruction, so that an analysis leaving by any of its return paths still releases it. It converts to ProgressReporter* and forwards operator->, so it can be used wherever a reporter pointer was used before.

Definition at line 76 of file analysishost.h.

Constructor & Destructor Documentation

◆ ScopedProgressReporter() [1/2]

ScopedProgressReporter::ScopedProgressReporter ( AnalysisHost *  host,
int  number_of_panels = 1,
bool  extra_label_and_progressbar = false 
)
inline

Definition at line 79 of file analysishost.h.

◆ ~ScopedProgressReporter()

ScopedProgressReporter::~ScopedProgressReporter ( )
inline

Definition at line 89 of file analysishost.h.

References AnalysisHost::DisposeProgressReporter(), host_, and reporter_.

◆ ScopedProgressReporter() [2/2]

ScopedProgressReporter::ScopedProgressReporter ( const ScopedProgressReporter &  )
delete

Member Function Documentation

◆ Get()

ProgressReporter * ScopedProgressReporter::Get ( ) const
inline

Definition at line 98 of file analysishost.h.

References reporter_.

◆ operator ProgressReporter *()

ScopedProgressReporter::operator ProgressReporter * ( ) const
inline

Definition at line 100 of file analysishost.h.

References reporter_.

◆ operator->()

ProgressReporter * ScopedProgressReporter::operator-> ( ) const
inline

Definition at line 99 of file analysishost.h.

References reporter_.

◆ operator=()

ScopedProgressReporter & ScopedProgressReporter::operator= ( const ScopedProgressReporter &  )
delete

Member Data Documentation

◆ host_

AnalysisHost* ScopedProgressReporter::host_
private

Definition at line 103 of file analysishost.h.

Referenced by ~ScopedProgressReporter().

◆ reporter_

ProgressReporter* ScopedProgressReporter::reporter_
private

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