CCCoreLib 31 May 2022
CloudCompare Core algorithms
Public Member Functions | List of all members
CCCoreLib::GenericProgressCallback Class Referenceabstract

A generic progress indicator interface to notify algorithms progress to the client application. More...

#include <GenericProgressCallback.h>

Public Member Functions

virtual ~GenericProgressCallback ()=default
 Default destructor.
 
virtual void update (float percent)=0
 Notifies the algorithm progress. More...
 
virtual void setMethodTitle (const char *methodTitle)=0
 Notifies the algorithm title. More...
 
virtual void setInfo (const char *infoStr)=0
 Notifies some information about the ongoing process. More...
 
virtual void start ()=0
 Notifies the fact that every information has been sent and that the process begins. More...
 
virtual void stop ()=0
 Notifies the fact that the process has ended. More...
 
virtual bool isCancelRequested ()=0
 Checks if the process should be canceled. More...
 
virtual bool textCanBeEdited () const
 Returns whether the dialog title and info can be updated or not.
 

Detailed Description

A generic progress indicator interface to notify algorithms progress to the client application.

Member Function Documentation

◆ isCancelRequested()

virtual bool CCCoreLib::GenericProgressCallback::isCancelRequested ( )
pure virtual

Checks if the process should be canceled.

This method is called by some process from time to time to know if it should halt before its normal ending. This is a way for the client application to cancel an ongoing process (but it won't work with all algorithms). Process results may be incomplete/void. The cancel requirement mechanism must be implemented (typically a simple "cancel()" method that will be called by the client application).

◆ setInfo()

virtual void CCCoreLib::GenericProgressCallback::setInfo ( const char *  infoStr)
pure virtual

Notifies some information about the ongoing process.

The notification is sent by the ongoing algorithm (on the library side).

Parameters
infoStrsome textual information about the ongoing process

◆ setMethodTitle()

virtual void CCCoreLib::GenericProgressCallback::setMethodTitle ( const char *  methodTitle)
pure virtual

Notifies the algorithm title.

The notification is sent by the ongoing algorithm (on the library side).

Parameters
methodTitlethe algorithm title

◆ start()

virtual void CCCoreLib::GenericProgressCallback::start ( )
pure virtual

Notifies the fact that every information has been sent and that the process begins.

Once start() is called, the progress bar and other informations could be displayed (for example).

◆ stop()

virtual void CCCoreLib::GenericProgressCallback::stop ( )
pure virtual

Notifies the fact that the process has ended.

Once end() is called, the progress bar and other informations could be hidden (for example).

◆ update()

virtual void CCCoreLib::GenericProgressCallback::update ( float  percent)
pure virtual

Notifies the algorithm progress.

The notification is sent by the running algorithm (on the library side). This virtual method shouldn't be called too often, as the real process behind it is unspecified and may be time consuming. Ideally it shouldn't be called more than a few hundreds time.

Parameters
percentcurrent progress, between 0.0 and 100.0

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