move utils to include. utils implimentations should be headers

This commit is contained in:
2025-03-26 13:07:18 -05:00
parent 12c82a8327
commit fd6a774c73
15 changed files with 110 additions and 131 deletions

View File

@@ -2,8 +2,7 @@
#define APP_H
#include "pch.hpp"
#include "Module.h"
#include "GuiModule.h"
#include "Module/Module.h"
namespace Archimedes {

View File

@@ -1,28 +0,0 @@
#ifndef GUIMODULE_H
#define GUIMODULE_H
#include "Module.h"
#include "Window/Window.h"
namespace Archimedes {
class GuiModule : public Module {
public:
typedef GuiModule* create_t(void*, App&);
GuiModule(void* h, App& a) : Module(h, a) {}
virtual ~GuiModule() { if(window) delete window; }
virtual void onLoad() = 0;
virtual void run() = 0;
Window* getWindow() { return window; }
void createWindow() { window = new Window(); }
protected:
Window* window;
};
}
#endif

View File

@@ -1,38 +0,0 @@
#ifndef MODULE_H
#define MODULE_H
#include "pch.hpp"
namespace Archimedes {
class App;
class Module {
friend class App;
public:
typedef Module* create_t(void*, App&);
Module(void* h, App& a) : handle(h), app(a) {};
virtual ~Module() {}
virtual void run() = 0;
virtual void onLoad() = 0;
std::string getName() const { return name; }
void* getHandle() { return handle; }
void setSelf(std::list<Module*>::iterator s) { self = s; }
protected:
std::string name;
void* handle;
std::list<Module*>::iterator self;
App& app;
std::unordered_map<std::string, std::string> deps;
};
}
#endif