mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-09 17:26:15 +00:00
Move PluginMonitor out of TLuaEngine
This commit is contained in:
23
include/TPluginMonitor.h
Normal file
23
include/TPluginMonitor.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
#include "IThreaded.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
class TLuaEngine;
|
||||
|
||||
class TPluginMonitor : IThreaded, public std::enable_shared_from_this<TPluginMonitor> {
|
||||
public:
|
||||
TPluginMonitor(const fs::path& Path, std::shared_ptr<TLuaEngine> Engine);
|
||||
|
||||
void operator()();
|
||||
|
||||
private:
|
||||
std::shared_ptr<TLuaEngine> mEngine;
|
||||
fs::path mPath;
|
||||
std::atomic_bool mShutdown;
|
||||
std::unordered_map<std::string, fs::file_time_type> mFileTimes;
|
||||
};
|
||||
Reference in New Issue
Block a user