From 3489ac1d725c0eadb7d75329f9e6074ed177d125 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 23 Jul 2026 16:53:05 +0200 Subject: Somethings wrong with the particle interaction --- modules/core/c++/environment.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'modules/core/c++/environment.hpp') diff --git a/modules/core/c++/environment.hpp b/modules/core/c++/environment.hpp index d8aa9ae..ed9cd40 100644 --- a/modules/core/c++/environment.hpp +++ b/modules/core/c++/environment.hpp @@ -7,16 +7,23 @@ namespace kel { namespace lbm { -struct environment { +class environment { +public: std::string name; std::filesystem::path lbm_dir; std::filesystem::path data_dir; + std::filesystem::path name_dir; +public: }; -saw::error_or setup_lbm_env(const std::string_view name){ +template +saw::error_or init_lbm_env(const saw::data& args){ namespace fs = std::filesystem; + auto& args_n = args.template get<"args">(); + auto& name = args_n.template get<"name">(); + const char* home_dir = std::getenv("HOME"); if(not home_dir){ return saw::make_error("Couldn't find home dir"); @@ -42,6 +49,10 @@ saw::error_or setup_lbm_env(const std::string_view name){ } } + { + env.name_dir = env.data_dir / name.view(); + } + return env; } -- cgit v1.2.3