You can use this class in order to display the loading status or call a callback before, after each step or/and after all step.
More...
#include <iloadingclass.h>
|
float | statusPercent () const |
| Return the current status in percentage. More...
|
|
Status | status () const |
| Return the current status. More...
|
|
void | registerBeforeStart (const std::function< void()> &func) |
| Register a callback wich will be called before starting loading. More...
|
|
void | registerReady (const std::function< void()> &func) |
| Register a callback wich will be called after object was loaded. More...
|
|
void | registerUpdateStatus (const std::function< void(float)> &func) |
| Register a callback wich will be called each step of the loading. This function pass loading percentage at the callback function. More...
|
|
virtual | ~ILoadingClass ()=default |
|
void | load () |
| Call this function in order to load the current object. More...
|
|
|
| ILoadingClass () |
|
virtual std::queue< std::function< void()> > | init ()=0 |
| You need to implement this function in order to define the loading steps. More...
|
|
void | execAllEvent () |
| Execute all register callback of the current state. More...
|
|
You can use this class in order to display the loading status or call a callback before, after each step or/and after all step.
Possible status of ILoading class.
Enumerator |
---|
UNDEFINED |
|
RUNNING |
|
READY |
|
dnai::interfaces::ILoadingClass::ILoadingClass |
( |
| ) |
|
|
inlineprotected |
virtual dnai::interfaces::ILoadingClass::~ILoadingClass |
( |
| ) |
|
|
virtualdefault |
void dnai::interfaces::ILoadingClass::execAllEvent |
( |
| ) |
|
|
inlineprotected |
Execute all register callback of the current state.
virtual std::queue<std::function<void()> > dnai::interfaces::ILoadingClass::init |
( |
| ) |
|
|
protectedpure virtual |
You need to implement this function in order to define the loading steps.
- Returns
Implemented in dnai::App.
void dnai::interfaces::ILoadingClass::load |
( |
| ) |
|
|
inline |
Call this function in order to load the current object.
void dnai::interfaces::ILoadingClass::registerBeforeStart |
( |
const std::function< void()> & |
func | ) |
|
|
inline |
Register a callback wich will be called before starting loading.
- Parameters
-
void dnai::interfaces::ILoadingClass::registerReady |
( |
const std::function< void()> & |
func | ) |
|
|
inline |
Register a callback wich will be called after object was loaded.
- Parameters
-
void dnai::interfaces::ILoadingClass::registerUpdateStatus |
( |
const std::function< void(float)> & |
func | ) |
|
|
inline |
Register a callback wich will be called each step of the loading. This function pass loading percentage at the callback function.
- Parameters
-
Status dnai::interfaces::ILoadingClass::status |
( |
| ) |
const |
|
inline |
Return the current status.
- Returns
- Status
float dnai::interfaces::ILoadingClass::statusPercent |
( |
| ) |
const |
|
inline |
Return the current status in percentage.
- Returns
- float
std::map<Status, std::queue<std::function<void()> > > dnai::interfaces::ILoadingClass::m_registeredEvents |
|
private |
Status dnai::interfaces::ILoadingClass::m_status |
|
private |
float dnai::interfaces::ILoadingClass::m_statusPercent |
|
private |
The documentation for this class was generated from the following file: