Tracks the loading progress state for ASAPCabinetFE. More...
#include <loading_progress.h>
Public Member Functions | |
void | addLogMessage (const std::string &message) |
Adds a log message to the buffer for UI display. | |
Tracks the loading progress state for ASAPCabinetFE.
This struct stores the state of the loading process, including overall progress (stages like fetching, scanning, matchmaking), per-table loading progress, metadata matching statistics, and a log message buffer for UI display. It is designed to be shared between a loading thread and a rendering thread (e.g., LoadingScreen), with thread safety ensured via a mutex. The struct supports a mini terminal display in the UI by maintaining a capped deque of recent log messages.
|
inline |
Adds a log message to the buffer for UI display.
Appends a new log message to the logMessages deque, maintaining a maximum size of maxLogMessages by removing the oldest message if necessary. This method is called by the loading thread to report progress or issues, and the messages are displayed in the LoadingScreen's mini terminal.
message | The log message to add (e.g., "DEBUG: Loaded table X"). |