|
Unravel Engine C++ Reference
|
#include <loading_screen.h>
Public Types | |
| using | visualizer_fn = std::function<void(const loading_screen&)> |
| using | on_fail_fn = std::function<void(const std::string& module, const std::string& message)> |
Public Member Functions | |
| void | set_visualizer (visualizer_fn fn) |
| void | set_on_fail (on_fail_fn fn) |
| void | begin_module (const std::string &module_name) |
| void | progress (size_t completed, size_t total, const std::string ¤t_job={}) |
| void | log (const std::string &message) |
| void | fail (const std::string &message) |
| auto | check (bool result) -> bool |
Convenience: if result is false and no error was set, auto-fails with the current module name. | |
| auto | has_failed () const -> bool |
| auto | error_message () const -> const std::string & |
| auto | current_module () const -> const std::string & |
| auto | completed () const -> size_t |
| auto | total () const -> size_t |
| auto | current_job () const -> const std::string & |
Definition at line 9 of file loading_screen.h.
| using unravel::loading_screen::on_fail_fn = std::function<void(const std::string& module, const std::string& message)> |
Definition at line 12 of file loading_screen.h.
| using unravel::loading_screen::visualizer_fn = std::function<void(const loading_screen&)> |
Definition at line 11 of file loading_screen.h.
| void unravel::loading_screen::begin_module | ( | const std::string & | module_name | ) |
Definition at line 18 of file loading_screen.cpp.
| auto unravel::loading_screen::check | ( | bool | result | ) | -> bool |
Convenience: if result is false and no error was set, auto-fails with the current module name.
Definition at line 57 of file loading_screen.cpp.
| auto unravel::loading_screen::completed | ( | ) | const -> size_t |
Definition at line 81 of file loading_screen.cpp.
| auto unravel::loading_screen::current_job | ( | ) | const -> const std::string& |
Definition at line 91 of file loading_screen.cpp.
| auto unravel::loading_screen::current_module | ( | ) | const -> const std::string& |
Definition at line 76 of file loading_screen.cpp.
| auto unravel::loading_screen::error_message | ( | ) | const -> const std::string& |
Definition at line 71 of file loading_screen.cpp.
| void unravel::loading_screen::fail | ( | const std::string & | message | ) |
Definition at line 44 of file loading_screen.cpp.
| auto unravel::loading_screen::has_failed | ( | ) | const -> bool |
Definition at line 66 of file loading_screen.cpp.
| void unravel::loading_screen::log | ( | const std::string & | message | ) |
Definition at line 37 of file loading_screen.cpp.
| void unravel::loading_screen::progress | ( | size_t | completed, |
| size_t | total, | ||
| const std::string & | current_job = {} ) |
Definition at line 29 of file loading_screen.cpp.
| void unravel::loading_screen::set_on_fail | ( | on_fail_fn | fn | ) |
Definition at line 13 of file loading_screen.cpp.
| void unravel::loading_screen::set_visualizer | ( | visualizer_fn | fn | ) |
Definition at line 8 of file loading_screen.cpp.
| auto unravel::loading_screen::total | ( | ) | const -> size_t |
Definition at line 86 of file loading_screen.cpp.