Lib
QOLを高める
|
Scene class with an async loading task. More...
#include <framework.h>
Public Member Functions | |
AsyncLoadScene ()=default | |
Constructor (default). More... | |
virtual | ~AsyncLoadScene () override |
Destructor. More... | |
virtual void | update () final override |
Check the state of sub thread and then call updateOnMainThread(). More... | |
![]() | |
SceneBase ()=default | |
Constructor (default). More... | |
virtual | ~SceneBase ()=default |
Virtual Destructor (default). More... | |
virtual void | render ()=0 |
Rendering. More... | |
Protected Member Functions | |
virtual void | loadOnSubThread (std::atomic_bool &cancel)=0 |
User-defined async task. More... | |
virtual void | updateOnMainThread ()=0 |
Called in update() More... | |
void | startLoadThread () |
Starts async load task on another thread. More... | |
bool | isLoading () const |
Poll the state of the async task. updateLoadStatus() is needed. More... | |
Scene class with an async loading task.
Definition at line 93 of file framework.h.
|
default |
Constructor (default).
|
overridevirtual |
Destructor.
If async task is being processed, sets cancel flag to true and blocks until task function will return.
Definition at line 55 of file framework.cpp.
|
protected |
Poll the state of the async task. updateLoadStatus() is needed.
Definition at line 100 of file framework.cpp.
|
protectedpure virtual |
User-defined async task.
This function will run on a separated thread and can take a long time to complete. If this class object is destructed while running, cancel flag which is passed by parameter will set to be true.
[in] | cancel | Cancel signal. |
|
protected |
Starts async load task on another thread.
Definition at line 68 of file framework.cpp.
|
finaloverridevirtual |
Check the state of sub thread and then call updateOnMainThread().
Implements yappy::framework::scene::SceneBase.
Definition at line 62 of file framework.cpp.
|
protectedpure virtual |
Called in update()