Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_ProgressStepCounter Class Reference

#include <opennurbs_progress_reporter.h>

Public Member Functions

 ON_ProgressStepCounter ()=default
 This class makes it easy for functions to use a progress reporter. More...
 
 ON_ProgressStepCounter (const ON_ProgressStepCounter &)=default
 
 ~ON_ProgressStepCounter ()=default
 
void Finished ()
 
void IncrementStep ()
 
ON_ProgressStepCounteroperator= (const ON_ProgressStepCounter &)=default
 
double Progress () const
 
unsigned int Step () const
 
unsigned int StepCount () const
 

Static Public Member Functions

static ON_ProgressStepCounter Create (ON_ProgressReporter *progress_reporter, unsigned int step_count)
 
static ON_ProgressStepCounter Create (ON_ProgressReporter *progress_reporter, unsigned int step_count, double progress_interval_start, double progress_interval_finish, unsigned int maximum_progress_reports)
 

Static Public Attributes

static const ON_ProgressStepCounter Empty
 

Constructor & Destructor Documentation

◆ ON_ProgressStepCounter() [1/2]

ON_ProgressStepCounter::ON_ProgressStepCounter ( )
default

This class makes it easy for functions to use a progress reporter.

◆ ~ON_ProgressStepCounter()

ON_ProgressStepCounter::~ON_ProgressStepCounter ( )
default

◆ ON_ProgressStepCounter() [2/2]

ON_ProgressStepCounter::ON_ProgressStepCounter ( const ON_ProgressStepCounter )
default

Member Function Documentation

◆ Create() [1/2]

static ON_ProgressStepCounter ON_ProgressStepCounter::Create ( ON_ProgressReporter progress_reporter,
unsigned int  step_count 
)
static

Description: When you have a process that needs to call a ON_ProgressReporter::ReportProgress() a reasonable number of times and you can calculate the number of steps your process takes, then ON_ProgressStepCounter will handle all the details. Parameters: progress_reporter - [in] Parameter passed to ON_ProgressReporter::ReportProgress(). step_count - [in] Number of steps. Remarks: This will create a ON_ProgressStepCounter that will call ON_ProgressReporter::ReportProgress(progress_reporter) at most 101 times. The first call reports progress 0.0. The last call reports progress 1.0.

◆ Create() [2/2]

static ON_ProgressStepCounter ON_ProgressStepCounter::Create ( ON_ProgressReporter progress_reporter,
unsigned int  step_count,
double  progress_interval_start,
double  progress_interval_finish,
unsigned int  maximum_progress_reports 
)
static

Description: When you have a process that needs to call a ON_ProgressReporter::ReportProgress() a reasonable number of times and you can calculate the number of steps your process takes, then ON_ProgressStepCounter will handle all the details. Parameters: progress_reporter - [in] Parameter passed to ON_ProgressReporter::ReportProgress(). step_count - [in] Number of steps. progress_interval_start - [in] progress_interval_finish - [in] 0.0 <= progress_interval_start < progress_interval_finish <= 1.0 maximum_progress_reports - [in] Maximum number of times to call ON_ProgressReporter::ReportProgress() after the initial call reporting progress of progress_interval_start. 10 to 100 are good values.

◆ Finished()

void ON_ProgressStepCounter::Finished ( )

Description: Call Finished() after you complete the process.

◆ IncrementStep()

void ON_ProgressStepCounter::IncrementStep ( )

Description: Call IncrementStep() after you complete each step.

◆ operator=()

ON_ProgressStepCounter& ON_ProgressStepCounter::operator= ( const ON_ProgressStepCounter )
default

◆ Progress()

double ON_ProgressStepCounter::Progress ( ) const

◆ Step()

unsigned int ON_ProgressStepCounter::Step ( ) const

◆ StepCount()

unsigned int ON_ProgressStepCounter::StepCount ( ) const

Member Data Documentation

◆ Empty

const ON_ProgressStepCounter ON_ProgressStepCounter::Empty
static