![]() |
Blue Brain BioExplorer
|
#include <Progress.h>
Public Member Functions | |
Progress ()=default | |
Progress (const std::string &operation) | |
void | update (const std::string &operation, const float amount) |
void | increment (const std::string &operation, const float increment) |
void | consume (std::function< void(std::string, float)> callback) |
![]() | |
BaseObject ()=default | |
virtual | ~BaseObject ()=default |
BaseObject (const BaseObject &) | |
BaseObject & | operator= (const BaseObject &rhs) |
bool | isModified () const |
void | resetModified () |
void | markModified (const bool triggerCallback=true) |
void | onModified (const ModifiedCallback &callback) |
void | clearModifiedCallback () |
Additional Inherited Members | |
![]() | |
using | ModifiedCallback = std::function< void(const BaseObject &)> |
![]() | |
template<typename T > | |
void | _updateValue (T &member, const T &newValue, const bool triggerCallback=true) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if< std::is_floating_point< T >::value >::type *=0) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if<!std::is_floating_point< T >::value >::type *=0) |
A progress object which offers thread-safe progress updates and thread-safe consumption of the current progress if it has changed in between.
Definition at line 36 of file Progress.h.
|
default |
|
inlineexplicit |
Definition at line 40 of file Progress.h.
|
inline |
Call the provided callback with the current progress if it has changed since the last invokation.
Definition at line 65 of file Progress.h.
|
inline |
Update the progress with the given increment.
Definition at line 54 of file Progress.h.
|
inline |
Update the progress with a new absolute amount.
Definition at line 46 of file Progress.h.