/
d.vision
/
division_engine_cpp
Обзор
Документация
Войти
/
d.vision
/
division_engine_cpp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
include/division_engine/lua/lua_manager.hpp
41 строка
909 B
den163
Added updat function to the lua interface
06 июн 2024, 11:50
06 июн 2024, 11:50
1a6e348
Код
Авторство
О чём код?
#pragma once #include "state.hpp" #include <lua.hpp> #include <concepts> #include <filesystem> #include <functional> #include <optional> #include <string> #include <type_traits> namespace division_engine::lua { class LuaManager { public: LuaManager() noexcept; ~LuaManager(); LuaManager(LuaManager&) = delete; LuaManager(LuaManager&&) = delete; LuaManager& operator=(const LuaManager&) = delete; LuaManager& operator=(LuaManager&&) = delete; State& state() { return _state; } static LuaManager with_search_script_path(const std::filesystem::path& path); void set_watch_file(const std::filesystem::path& main_script_path); void update(); private: State _state; std::optional<std::filesystem::path> _main_script_path; std::filesystem::file_time_type _last_write_time; bool check_script_changes(const std::filesystem::path& script_path); }; }