Easy3D 2.6.1
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
ProgressLogger Class Reference

An implementation of progress logging mechanism. More...

#include <easy3d/util/progress.h>

Public Member Functions

 ProgressLogger (std::size_t max_val, bool update_viewer, bool quiet=false)
 Constructor.
 
virtual ~ProgressLogger ()
 Destructor.
 
virtual void notify (std::size_t new_value)
 Notify the progress.
 
virtual void next ()
 Move to the next step.
 
virtual void done ()
 Mark the progress as done.
 
bool is_canceled () const
 Check if the progress is canceled.
 
void reset ()
 Resets the progress logger without changing the progress range.
 
void reset (std::size_t max_val)
 Resets the progress logger, and meanwhile changes the progress range.
 

Detailed Description

An implementation of progress logging mechanism.

Constructor & Destructor Documentation

◆ ProgressLogger()

ProgressLogger ( std::size_t max_val,
bool update_viewer,
bool quiet = false )

Constructor.

Parameters
max_valThe max value (i.e., upper bound) of the progress range.
update_viewerTrue to trigger the viewer to update for each step.
quietTrue to make the logger quiet (i.e., don't notify the client).

Member Function Documentation

◆ is_canceled()

bool is_canceled ( ) const

Check if the progress is canceled.

Returns
True if the progress is canceled, false otherwise.

◆ notify()

void notify ( std::size_t new_value)
virtual

Notify the progress.

Parameters
new_valueThe new progress value.

◆ reset()

void reset ( std::size_t max_val)

Resets the progress logger, and meanwhile changes the progress range.

Parameters
max_valThe new max value of the progress range.

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