PCL
pcl::SpinStatus Class Reference

A status monitoring callback that shows a spinning character animation on the processing console. More...

#include <SpinStatus.h>

+ Inheritance diagram for pcl::SpinStatus:

Public Member Functions

 SpinStatus ()=default
 
 SpinStatus (const SpinStatus &x)
 
 SpinStatus (SpinStatus &&x)
 
 ~SpinStatus () override
 
int Completed (const StatusMonitor &m) const override
 
void InfoUpdated (const StatusMonitor &m) const override
 
int Initialized (const StatusMonitor &m) const override
 
SpinStatusoperator= (const SpinStatus &x)
 
SpinStatusoperator= (SpinStatus &&x)
 
int Updated (const StatusMonitor &m) const override
 
- Public Member Functions inherited from pcl::StatusCallback
 StatusCallback ()=default
 
 StatusCallback (const StatusCallback &)=default
 
 StatusCallback (StatusCallback &&)=default
 
virtual ~StatusCallback ()
 
StatusCallbackoperator= (const StatusCallback &)=default
 
StatusCallbackoperator= (StatusCallback &&)=default
 

Detailed Description

SpinStatus is a StatusCallback derived class that generates a spinning character animation on the processing console. The spinning animation consists of successively writing the four - \ | / characters at the same position on the console. This is a classical form of text-based animation that provides a nice feedback to the user while a long process is running.

SpinStatus is suitable for processes where a total status monitoring count cannot be computed in advance. For example, this happens with processes that perform an unpredictable number of iterations while a given contition is not fulfilled. When a status monitoring count is available before running a process, the StandardStatus monitoring class is preferable.

SpinStatus and StandardStatus are used by all standard PixInsight processes and file formats. Unless a specific module has an extremely good reason to proceed otherwise, we recommend that all modules also use these monitoring classes. This ensures that efficient and coherent feedback is provided to the user on the entire PixInsight platform.

As StandardStatus, SpinStatus also allows the PixInsight core application to process mouse, keyboard and screen update events. In this way the application's GUI remains responsive in case the user requests aborting or suspending the monitored process.

See also
StatusCallback, StatusMonitor, Console, StandardStatus, ProgressBarStatus, MuteStatus

Definition at line 100 of file SpinStatus.h.

Constructor & Destructor Documentation

◆ SpinStatus() [1/3]

pcl::SpinStatus::SpinStatus ( )
default

Constructs a default SpinStatus object.

◆ SpinStatus() [2/3]

pcl::SpinStatus::SpinStatus ( const SpinStatus x)
inline

Copy constructor.

Definition at line 112 of file SpinStatus.h.

◆ SpinStatus() [3/3]

pcl::SpinStatus::SpinStatus ( SpinStatus &&  x)
inline

Move constructor.

Definition at line 121 of file SpinStatus.h.

◆ ~SpinStatus()

pcl::SpinStatus::~SpinStatus ( )
inlineoverride

Destroys a SpinStatus instance.

Definition at line 133 of file SpinStatus.h.

Member Function Documentation

◆ Completed()

int pcl::SpinStatus::Completed ( const StatusMonitor m) const
overridevirtual

Function called by a status monitor object m to signal that the current process has finished.

Implements pcl::StatusCallback.

◆ InfoUpdated()

void pcl::SpinStatus::InfoUpdated ( const StatusMonitor m) const
overridevirtual

Function called by a status monitor object m when the progress information for the current process has been changed.

Implements pcl::StatusCallback.

◆ Initialized()

int pcl::SpinStatus::Initialized ( const StatusMonitor m) const
overridevirtual

This function is called by a status monitor object m when a new monitored process is about to start.

Implements pcl::StatusCallback.

◆ operator=() [1/2]

SpinStatus& pcl::SpinStatus::operator= ( const SpinStatus x)
inline

Copy assignment operator. Returns a reference to this object.

Definition at line 140 of file SpinStatus.h.

◆ operator=() [2/2]

SpinStatus& pcl::SpinStatus::operator= ( SpinStatus &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 150 of file SpinStatus.h.

◆ Updated()

int pcl::SpinStatus::Updated ( const StatusMonitor m) const
overridevirtual

Function called by a status monitor object m to signal an update of the progress count for the current process.

Implements pcl::StatusCallback.


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