|
coastline 0.0.4
|
Writes copies of the configuration on a thread, away from the frames. More...
#include <configsaver.h>
Public Member Functions | |
| ConfigSaver () | |
| ~ConfigSaver () | |
| Write the copy that waits, if any, and stop the thread. | |
| ConfigSaver (const ConfigSaver &)=delete | |
| Prevent copying the writing thread. | |
| ConfigSaver & | operator= (const ConfigSaver &)=delete |
| Prevent assignment of the writing thread. | |
| void | Save (GameConfig config, std::filesystem::path path) |
| Queue a copy of the configuration for writing. | |
| bool | Flush () |
| Wait until every queued copy is written. | |
| bool | Failed () |
Writes copies of the configuration on a thread, away from the frames.
A copy saved while another waits replaces it, and the copies are written in the order they are saved.
| coastline::ConfigSaver::ConfigSaver | ( | ) |
| coastline::ConfigSaver::~ConfigSaver | ( | ) |
Write the copy that waits, if any, and stop the thread.
|
delete |
Prevent copying the writing thread.
|
delete |
Prevent assignment of the writing thread.
| void coastline::ConfigSaver::Save | ( | GameConfig | config, |
| std::filesystem::path | path ) |
Queue a copy of the configuration for writing.
| config | The configuration to write. |
| path | The INI file. |
| bool coastline::ConfigSaver::Flush | ( | ) |
Wait until every queued copy is written.
| bool coastline::ConfigSaver::Failed | ( | ) |