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 79 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 82 of file analysishost.h.

References host_, and reporter_.

Referenced by ScopedProgressReporter(), and operator=().

◆ ~ScopedProgressReporter()

ScopedProgressReporter::~ScopedProgressReporter ( )
inline

Definition at line 92 of file analysishost.h.

References host_, and reporter_.

◆ ScopedProgressReporter() [2/2]

ScopedProgressReporter::ScopedProgressReporter ( const ScopedProgressReporter & )
delete

Member Function Documentation

◆ Get()

ProgressReporter * ScopedProgressReporter::Get ( ) const
inline

Definition at line 101 of file analysishost.h.

References reporter_.

◆ operator ProgressReporter *()

ScopedProgressReporter::operator ProgressReporter * ( ) const
inline

Definition at line 103 of file analysishost.h.

References reporter_.

◆ operator->()

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

Definition at line 102 of file analysishost.h.

References reporter_.

◆ operator=()

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

Member Data Documentation

◆ host_

AnalysisHost* ScopedProgressReporter::host_
private

Definition at line 106 of file analysishost.h.

Referenced by ScopedProgressReporter(), and ~ScopedProgressReporter().

◆ reporter_

ProgressReporter* ScopedProgressReporter::reporter_
private

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