From 7772f8871348b7b52cb0a478bb76df68d8799a07 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Fri, 8 Sep 2023 17:12:22 +0100 Subject: More refactoring and duplicate code removal --- src/openvic/dataloader/Dataloader.hpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/openvic/dataloader/Dataloader.hpp (limited to 'src/openvic/dataloader/Dataloader.hpp') diff --git a/src/openvic/dataloader/Dataloader.hpp b/src/openvic/dataloader/Dataloader.hpp deleted file mode 100644 index f723803..0000000 --- a/src/openvic/dataloader/Dataloader.hpp +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace OpenVic { - struct GameManager; - struct PopManager; - struct Map; - - class Dataloader { - std::vector roots; - - bool _load_pop_types(PopManager& pop_manager, std::filesystem::path const& pop_type_directory) const; - bool _load_map_dir(Map& map, std::filesystem::path const& map_directory) const; - - public: - Dataloader() = default; - - /* In reverse-load order, so base defines first and final loaded mod last */ - bool set_roots(std::vector new_roots); - - std::filesystem::path lookup_file(std::filesystem::path const& path) const; - static const std::filesystem::path TXT; - std::vector lookup_files_in_dir(std::filesystem::path const& path, - std::filesystem::path const* extension = &TXT) const; - bool apply_to_files_in_dir(std::filesystem::path const& path, - std::function callback, - std::filesystem::path const* extension = &TXT) const; - - bool load_defines(GameManager& game_manager) const; - bool load_pop_history(GameManager& game_manager, std::filesystem::path const& path) const; - }; -} -- cgit v1.2.3-56-ga3b1