#include "globals.h" // Variables definitions G_varsType G_vars; // Functions addresses G_funcsType G_funcs; // List of objects to save G_toType G_tosave; // List of objects to print G_toType G_toprint; void ClearGlobals() { for(auto& it:G_vars) delete it.second; for(auto& it:G_tosave) delete it; for(auto& it:G_toprint) delete it; G_vars.clear(); G_tosave.clear(); G_toprint.clear(); } void RegisterFunction(const std::string& name, Func func) { G_funcs.emplace(name,func); }