CCCoreLib 31 May 2022
CloudCompare Core algorithms
|
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. | |
A generic progress indicator interface to notify algorithms progress to the client application.
|
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).
|
pure virtual |
Notifies some information about the ongoing process.
The notification is sent by the ongoing algorithm (on the library side).
infoStr | some textual information about the ongoing process |
|
pure virtual |
Notifies the algorithm title.
The notification is sent by the ongoing algorithm (on the library side).
methodTitle | the algorithm title |
|
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).
|
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).
|
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.
percent | current progress, between 0.0 and 100.0 |