Blue Brain BioExplorer
core::LoaderProgress Class Reference

#include <Loader.h>

Public Types

using CallbackFn = std::function< void(const std::string &, float)>
 

Public Member Functions

 LoaderProgress (CallbackFn callback)
 
 LoaderProgress ()=default
 
 ~LoaderProgress ()=default
 
void updateProgress (const std::string &message, const float fraction) const
 

Public Attributes

CallbackFn _callback
 

Detailed Description

A class for providing progress feedback

Definition at line 38 of file Loader.h.

Member Typedef Documentation

◆ CallbackFn

using core::LoaderProgress::CallbackFn = std::function<void(const std::string&, float)>

The callback for each progress update with the signature (message, fraction of progress in 0..1 range)

Definition at line 45 of file Loader.h.

Constructor & Destructor Documentation

◆ LoaderProgress() [1/2]

core::LoaderProgress::LoaderProgress ( CallbackFn  callback)
inline

Definition at line 47 of file Loader.h.

◆ LoaderProgress() [2/2]

core::LoaderProgress::LoaderProgress ( )
default

◆ ~LoaderProgress()

core::LoaderProgress::~LoaderProgress ( )
default

Member Function Documentation

◆ updateProgress()

void core::LoaderProgress::updateProgress ( const std::string &  message,
const float  fraction 
) const
inline

Update the current progress of an operation and call the callback

Definition at line 58 of file Loader.h.

Member Data Documentation

◆ _callback

CallbackFn core::LoaderProgress::_callback

Definition at line 67 of file Loader.h.


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