aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/dataloader/Dataloader.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-24 01:32:23 +0200
committer Hop311 <hop3114@gmail.com>2023-08-24 01:32:23 +0200
commitefa88c722fcb6c8fea7a86e1b3b8a83f1f59eb31 (patch)
tree0d64199bf4f19fabaaff083b35aa8625823d6c1e /src/openvic/dataloader/Dataloader.hpp
parent6f4a6c77c6f2613e65a403c3a2964d5041a538c7 (diff)
Big Dataloader Commit (openvic-simulation)
Diffstat (limited to 'src/openvic/dataloader/Dataloader.hpp')
-rw-r--r--src/openvic/dataloader/Dataloader.hpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/openvic/dataloader/Dataloader.hpp b/src/openvic/dataloader/Dataloader.hpp
index 062f3d5..b080300 100644
--- a/src/openvic/dataloader/Dataloader.hpp
+++ b/src/openvic/dataloader/Dataloader.hpp
@@ -1,16 +1,24 @@
#pragma once
-#include <filesystem>
-#include "../Simulation.hpp"
+
+#include "openvic/types/Return.hpp"
+#include "openvic-dataloader/v2script/Parser.hpp"
namespace OpenVic {
+ struct GameManager;
+
class Dataloader {
- public:
- enum class LoadingMode {
- DL_COMPATIBILITY
- };
+ std::vector<std::filesystem::path> roots;
+
+ public:
+ Dataloader() = default;
+
+ /* In reverse-load order, so base defines first and final loaded mod last */
+ return_t set_roots(std::vector<std::filesystem::path> new_roots);
+
+ std::filesystem::path lookup_file(std::filesystem::path const& path) const;
+ std::vector<std::filesystem::path> lookup_files_in_dir(std::filesystem::path const& path) const;
- static bool loadDir(std::filesystem::path p, Simulation& sim, LoadingMode loadMode = LoadingMode::DL_COMPATIBILITY) {
- return true;
- }
+ return_t load_defines(GameManager& game_manager) const;
+ return_t load_pop_history(GameManager& game_manager, std::filesystem::path const& path) const;
};
-} \ No newline at end of file
+}