add basic types and fix cmake

This commit is contained in:
2026-04-19 15:35:21 +02:00
parent ebf6cea353
commit 41fd2a83ee
30 changed files with 1562 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include <string>
#include "GameConfig.h"
// Parses the five simulation TOML files from a directory and returns a fully
// populated, immutable GameConfig. Throws std::runtime_error on any parse or
// validation failure; the exception message identifies the offending file,
// field, or formula (see architecture.md "Config Loading").
//
// Per-file helpers are exposed so tests can exercise individual loaders in
// isolation.
class ConfigLoader
{
public:
static GameConfig loadFromDirectory(const std::string& configDir);
static WorldConfig loadWorld(const std::string& path);
static BuildingsConfig loadBuildings(const std::string& path);
static RecipesConfig loadRecipes(const std::string& path);
static ShipsConfig loadShips(const std::string& path);
static StationsConfig loadStations(const std::string& path);
};