6 #include <condition_variable>
12 #if __has_include(<filesystem>)
14 namespace fs = std::filesystem;
15 #elif __has_include(<boost/filesystem.hpp>)
16 #include <boost/filesystem.hpp>
17 namespace fs = boost::filesystem;
19 #error "No suitable filesystem library available"
41 Saver(
int interval, std::string class_name);
45 void AddObjectToSave(
void *
object,
int type,
const std::string& filename);
59 std::string parent_name;
62 std::atomic<bool> exitSaveLoop;
63 std::queue<data_object_t *> objects_to_save_;
65 std::thread save_thread_;
66 std::mutex queue_mutex_;
67 std::condition_variable cv_;