sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/systems/dyn_loader_system.hpp raw
#pragma once
#include <string>
#include "systems/game_mod_abi.h"
#include "text/handler.hpp"
#include "utils/globals.hpp"
namespace
Nimbin
{
class DynLoaderSystem
{
std::string _pending_so;
std::string _last_so_path;
int _count { 0 };
int _build_serial { 0 };
FILE* _pipe { nullptr };
void* _handle { nullptr };
void push_Line (Text::Handler& out, const std::string& line);
static std::string
wrap_Source(const std::string& user_body);
public:
bool last_build_ok { false };
void build (Text::Handler& out, const std::string& user_src, bool full_source);
void update (Text::Handler& out);
DynArray<DynObject>
load_Objects();
bool is_Running () const { return _pipe != nullptr; }
const std::string&
get_LastSoPath() const { return _last_so_path; }
~DynLoaderSystem();
};
} // namespace Nimbin