|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
A thread-safe wrapper for the simulation progress callback. More...
#include "sim_threading.h"
Public Types | |
| using | Callback = std::function< void(const std::string &, int, int)> |
| Defines the signature for the progress reporting callback function. | |
Public Member Functions | |
| ProgressReporter (Callback cb) | |
| Constructs a ProgressReporter with the given callback. | |
| void | report (const std::string &msg, int current, int total) |
| Safely reports progress to the underlying callback. | |
A thread-safe wrapper for the simulation progress callback.
Allows multiple worker threads to report progress concurrently without race conditions.
Definition at line 67 of file sim_threading.h.
Defines the signature for the progress reporting callback function.
Definition at line 74 of file sim_threading.h.
|
explicit |
Constructs a ProgressReporter with the given callback.
| cb | The callback function to wrap. |
Definition at line 80 of file sim_threading.h.
Safely reports progress to the underlying callback.
| msg | The status message to report. |
| current | The current progress value. |
| total | The total progress value. |
Definition at line 88 of file sim_threading.h.
References max.